11<script setup lang="ts">
2- import type { BreadCrumbItem , PulseResponse } from ' @/types/types' ;
2+ import type { BreadCrumbItem } from ' @/types/types' ;
3+ import type { PulseResponse } from ' @/types/pulseTypes' ;
34
4- import { useGetPulse , useGetSiteAnalytics } from ' @/service/queries' ;
55import { computed , ref , useTemplateRef , watch } from ' vue' ;
6+ import { useGetPulse , useGetSiteAnalytics } from ' @/service/queries' ;
67import { handleStartTask } from ' @/service/taskService' ;
78import { periodForHumans } from ' @/service/pulseUtil' ;
89
@@ -21,6 +22,12 @@ import ProiconsArrowSync from '~icons/proicons/arrow-sync';
2122import ProiconsHome2 from ' ~icons/proicons/home-2' ;
2223import ProiconsBolt from ' ~icons/proicons/bolt' ;
2324import ProiconsAdd from ' ~icons/proicons/add' ;
25+ import PulseExceptions from ' ../pulseCards/PulseExceptions.vue' ;
26+ import PulseSlowRequests from ' ../pulseCards/PulseSlowRequests.vue' ;
27+ import PulseSlowJobs from ' ../pulseCards/PulseSlowJobs.vue' ;
28+ import PulseSlowOutgoingRequests from ' ../pulseCards/PulseSlowOutgoingRequests.vue' ;
29+ import PulseSlowQueries from ' ../pulseCards/PulseSlowQueries.vue' ;
30+ import PulseCache from ' ../pulseCards/PulseCache.vue' ;
2431
2532const validPeriods: { key: string ; value: string }[] = [
2633 { key: ' 1h' , value: ' 1_hour' },
@@ -97,20 +104,24 @@ watch(
97104 <template #icon >
98105 <LucideChartNoAxesCombined class="w-6 h-6" />
99106 </template >
100- <template #slot >
101- <span v-for =" (stat, index) in stats?.changes" :key =" index" class =" flex gap-2 capitalize items-center flex-wrap" >
102- <h3 class =" text-sm dark:text-slate-400 text-slate-500 w-full text-nowrap" >{{ stat.title }}</h3 >
103- <span >
104- <h3 class =" text-lg" >{{ stat.count ?? 0 }}</h3 >
105- </span >
106- <h4 :class =" `text-sm ${stat.change >= 0 ? 'text-green-700 dark:text-green-600' : 'text-rose-500'} ml-auto`" >
107- {{ `${stat.change === 0 ? 'no change' : `${stat.change >= 0 ? '+' : '-'}${stat.change}`}` }}
108- </h4 >
107+ <span v-for =" (stat, index) in stats?.changes" :key =" index" class =" flex gap-2 capitalize items-center flex-wrap" >
108+ <h3 class =" text-sm dark:text-neutral-400 text-neutral-500 w-full text-nowrap" >{{ stat.title }}</h3 >
109+ <span >
110+ <h3 class =" text-lg" >{{ stat.count ?? 0 }}</h3 >
109111 </span >
110- </template >
112+ <h4 :class =" `text-sm ${stat.change >= 0 ? 'text-green-700 dark:text-green-600' : 'text-rose-500'} ml-auto`" >
113+ {{ `${stat.change === 0 ? 'no change' : `${stat.change >= 0 ? '+' : '-'}${stat.change}`}` }}
114+ </h4 >
115+ </span >
111116 </DashboardCard >
112117 <PulseUsage :pulseData =" pulseData " :isLoading =" pulseLoading " :period =" period " :rows =" 4 " />
113118 <PulseQueues :pulseData =" pulseData " :isLoading =" pulseLoading " :period =" period " :rows =" 2 " />
114- <PulseRequests :pulseData =" pulseData " :isLoading =" pulseLoading " :period =" period " :rows =" 2 " />
119+ <PulseRequests v-if =" pulseData " :pulseData =" pulseData " :isLoading =" pulseLoading " :period =" period " :rows =" 2 " />
120+ <PulseSlowRequests v-if =" pulseData " :pulse-data =" pulseData " :is-loading =" pulseLoading " :period =" period " :rows =" 2 " cols="3" />
121+ <PulseSlowJobs v-if =" pulseData " :pulse-data =" pulseData " :is-loading =" pulseLoading " :period =" period " :rows =" 2 " :cols =" 3 " />
122+ <PulseSlowQueries v-if =" pulseData " :pulse-data =" pulseData " :is-loading =" pulseLoading " :period =" period " :rows =" 2 " :cols =" 3 " />
123+ <PulseCache v-if =" pulseData " :pulse-data =" pulseData " :is-loading =" pulseLoading " :period =" period " :rows =" 2 " :cols =" 3 " />
124+ <PulseExceptions :pulse-data =" pulseData " :is-loading =" pulseLoading " :period =" period " :rows =" 2 " />
125+ <PulseSlowOutgoingRequests v-if =" pulseData " :pulse-data =" pulseData " :is-loading =" pulseLoading " :period =" period " :rows =" 2 " />
115126 </span >
116127</template >
0 commit comments