@swiss-ai-hub/web 0.290.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +661 -0
- package/README.md +479 -0
- package/app.config.ts +1 -0
- package/app.vue +52 -0
- package/assets/css/main.css +4 -0
- package/assets/images/logo.png +0 -0
- package/components/Agent/Avatar.vue +40 -0
- package/components/Agent/Card.vue +139 -0
- package/components/Agent/Configuration.vue +20 -0
- package/components/Agent/CreateModal.vue +287 -0
- package/components/Agent/EmptyCard.vue +35 -0
- package/components/Agent/List.vue +85 -0
- package/components/Agent/TemplateCard.vue +58 -0
- package/components/AppLoader.vue +55 -0
- package/components/Chat/Message.vue +90 -0
- package/components/Chat/SourceNodes.vue +120 -0
- package/components/Chat/Thread.vue +134 -0
- package/components/Costs/Table.vue +56 -0
- package/components/Dashboard/Component/BarChart.vue +46 -0
- package/components/Dashboard/Component/LineChart.vue +138 -0
- package/components/Dashboard/Component/Number.vue +31 -0
- package/components/Dashboard/Grid.vue +214 -0
- package/components/Dashboard/Item.vue +75 -0
- package/components/Dashboard/Trend.vue +34 -0
- package/components/Display/List/DisplayList.vue +93 -0
- package/components/Evaluation/Dataset/Card.vue +70 -0
- package/components/Evaluation/Dataset/Create.vue +81 -0
- package/components/Evaluation/Dataset/Edit.vue +132 -0
- package/components/Event/Display/AddMemoryToChatHistoryEvent.vue +60 -0
- package/components/Event/Display/AgentInTheLoopRequestEvent.vue +56 -0
- package/components/Event/Display/AgentInTheLoopResponseEvent.vue +17 -0
- package/components/Event/Display/Base.vue +125 -0
- package/components/Event/Display/BaseRetrieveMemoryEvent.vue +101 -0
- package/components/Event/Display/BaseStoreMemoryEvent.vue +182 -0
- package/components/Event/Display/ChunkEvent.vue +40 -0
- package/components/Event/Display/EmbeddingEvent.vue +25 -0
- package/components/Event/Display/ExceptionEvent.vue +21 -0
- package/components/Event/Display/GuardAcceptEvent.vue +25 -0
- package/components/Event/Display/GuardEvent.vue +17 -0
- package/components/Event/Display/GuardRejectionEvent.vue +25 -0
- package/components/Event/Display/HumanInTheLoopRequestEvent.vue +53 -0
- package/components/Event/Display/HumanInTheLoopResponseEvent.vue +40 -0
- package/components/Event/Display/LLMCostEvent.vue +25 -0
- package/components/Event/Display/LLMEvent.vue +92 -0
- package/components/Event/Display/LimitChatHistoryEvent.vue +60 -0
- package/components/Event/Display/RAGFailureStopEvent.vue +28 -0
- package/components/Event/Display/RAGStartEvent.vue +77 -0
- package/components/Event/Display/RAGSuccessStopEvent.vue +16 -0
- package/components/Event/Display/RawDataContent.vue +69 -0
- package/components/Event/Display/RerankerEvent.vue +39 -0
- package/components/Event/Display/RetrieverEvent.vue +22 -0
- package/components/Event/Display/RouterEvent.vue +54 -0
- package/components/Event/Display/StandaloneQuestionCondenserEvent.vue +38 -0
- package/components/Event/Display/StopEvent.vue +16 -0
- package/components/Event/Display/ThoughtEvent.vue +20 -0
- package/components/Event/Display/ToolEvent.vue +38 -0
- package/components/Event/Display/UnknownEvent.vue +17 -0
- package/components/Event/Display/UserMessageEvent.vue +35 -0
- package/components/Event/List/EventList.vue +249 -0
- package/components/Event/Statistics.vue +49 -0
- package/components/Event/Timeseries.vue +224 -0
- package/components/FormKit/AgentSelector.vue +307 -0
- package/components/FormKit/ChipsInput.vue +62 -0
- package/components/FormKit/DynamicConfiguration.vue +155 -0
- package/components/FormKit/IconSelector.vue +72 -0
- package/components/FormKit/KnowledgeDatabaseSelector.vue +92 -0
- package/components/FormKit/LocaleInput.vue +150 -0
- package/components/FormKit/ModelSelect.vue +110 -0
- package/components/FormKit/Repeater.vue +93 -0
- package/components/FormKit/VectorStoreInput.vue +247 -0
- package/components/Knowledge/Document/List.vue +140 -0
- package/components/Knowledge/Document/Overview.vue +28 -0
- package/components/Knowledge/Document/UploadModal.vue +298 -0
- package/components/Knowledge/Document/WithNodes.vue +105 -0
- package/components/Knowledge/Namespace/Card.vue +108 -0
- package/components/Knowledge/Namespace/CreateModal.vue +203 -0
- package/components/Knowledge/Namespace/EditModal.vue +134 -0
- package/components/Knowledge/Namespace/EmptyCard.vue +35 -0
- package/components/Knowledge/Node/Content.vue +71 -0
- package/components/Markdown/Renderer.vue +87 -0
- package/components/Memory/DetailPage.vue +48 -0
- package/components/Memory/Edit.vue +241 -0
- package/components/Memory/Graph.vue +318 -0
- package/components/Memory/List.vue +155 -0
- package/components/Memory/MemoryManagementPage.vue +178 -0
- package/components/Memory/OpenWebUIContent.vue +96 -0
- package/components/Memory/PageLayout.vue +72 -0
- package/components/Models/ModelDetailsPanel.vue +250 -0
- package/components/Models/NamespaceCard.vue +79 -0
- package/components/Navigation/Left.vue +85 -0
- package/components/Navigation/Top.vue +31 -0
- package/components/Notification/Item.vue +88 -0
- package/components/Notification/NotificationsOverlay.vue +164 -0
- package/components/Process/Card.vue +119 -0
- package/components/Process/Configuration.vue +20 -0
- package/components/Process/CreateModal.vue +276 -0
- package/components/Process/EmptyCard.vue +35 -0
- package/components/Process/Form.vue +153 -0
- package/components/Process/Starts.vue +44 -0
- package/components/Process/Walkthrough/List.vue +162 -0
- package/components/Role/AccessRulesEditor.vue +132 -0
- package/components/Role/Card.vue +68 -0
- package/components/Role/Create.vue +55 -0
- package/components/Role/Edit.vue +82 -0
- package/components/Role/UsageLimitsEditor.vue +225 -0
- package/components/Service/Selection.vue +148 -0
- package/components/Structural/Column.vue +74 -0
- package/components/Structural/Screen.vue +10 -0
- package/components/Structural/Substructure.vue +5 -0
- package/components/Tenant/Switcher.vue +102 -0
- package/components/Thread/Details.vue +135 -0
- package/components/Thread/Hierarchy.vue +136 -0
- package/components/Thread/Info.vue +41 -0
- package/components/Thread/List.vue +136 -0
- package/components/User/Bar.vue +74 -0
- package/components/User/List.vue +86 -0
- package/components/User/RoleChips.vue +83 -0
- package/components/User/Settings.vue +79 -0
- package/components/Workflow/Modal.vue +39 -0
- package/components/Workflow/NodeCard.vue +41 -0
- package/components/Workflow/StartNode.vue +24 -0
- package/components/Workflow/StepNode.vue +27 -0
- package/components/Workflow/StopNode.vue +24 -0
- package/components/Workflow/Visualization.vue +265 -0
- package/components/mdc/MarkdownFigure.vue +9 -0
- package/components/mdc/MarkdownTable.vue +9 -0
- package/components/mdc/ResolveImageComponent.vue +58 -0
- package/composables/agent/useAgentClass.ts +27 -0
- package/composables/agent/useAgentClassInstances.ts +27 -0
- package/composables/agent/useAgentClasses.ts +27 -0
- package/composables/agent/useAgentIconFromThread.ts +8 -0
- package/composables/agent/useAgentInstance.ts +28 -0
- package/composables/agent/useAgentInstanceThreads.ts +76 -0
- package/composables/agent/useAgentInstances.ts +25 -0
- package/composables/agent/useAgentNavigation.ts +35 -0
- package/composables/agent/useCreateAgentInstance.ts +33 -0
- package/composables/agent/useDeleteAgentInstance.ts +31 -0
- package/composables/agent/useUpdateAgentInstance.ts +40 -0
- package/composables/auth/useAuth.ts +54 -0
- package/composables/auth/useAuthProviders.ts +14 -0
- package/composables/chat/useChatCompletions.ts +30 -0
- package/composables/dashboard/useAgentNameFromDashboardWidget.ts +27 -0
- package/composables/dashboard/useDashboardComponent.ts +27 -0
- package/composables/dashboard/useSaveDashboard.ts +21 -0
- package/composables/document/useCreateNamespace.ts +26 -0
- package/composables/document/useDatabases.ts +23 -0
- package/composables/document/useDocument.ts +29 -0
- package/composables/document/useDocumentUrl.ts +20 -0
- package/composables/document/useDocuments.ts +107 -0
- package/composables/document/useNodes.ts +29 -0
- package/composables/document/useSummaryNodes.ts +32 -0
- package/composables/document/useUpdateNamespace.ts +22 -0
- package/composables/evaluation/useCreateDataset.ts +19 -0
- package/composables/evaluation/useDataset.ts +26 -0
- package/composables/evaluation/useDatasets.ts +25 -0
- package/composables/evaluation/useUpdateDataset.ts +23 -0
- package/composables/event/useBasicEventStatistics.ts +83 -0
- package/composables/event/useEventColor.ts +25 -0
- package/composables/event/useEventComponent.ts +87 -0
- package/composables/event/useEventTimeseries.ts +39 -0
- package/composables/event/useEventTimeseriesStats.ts +26 -0
- package/composables/file/useFileUpload.ts +91 -0
- package/composables/file/useSupportedFileTypes.ts +22 -0
- package/composables/form/useCreateInstanceForm.ts +251 -0
- package/composables/form/useFormKitTransform.ts +753 -0
- package/composables/memory/useMemoryCRUD.ts +88 -0
- package/composables/memory/useMemoryFactory.ts +319 -0
- package/composables/memory/useMemorySearchFilter.ts +74 -0
- package/composables/models/useModelsList.ts +24 -0
- package/composables/models/useSingleModel.ts +30 -0
- package/composables/notification/useNotificationPoller.ts +58 -0
- package/composables/notification/useNotifications.ts +57 -0
- package/composables/notification/useUpdateMultipleNotifications.ts +17 -0
- package/composables/notification/useUpdateNotification.ts +17 -0
- package/composables/process/useCreateProcessInstance.ts +32 -0
- package/composables/process/useDeleteProcessInstance.ts +31 -0
- package/composables/process/useProcessClasses.ts +27 -0
- package/composables/process/useProcessInstance.ts +28 -0
- package/composables/process/useProcessInstances.ts +27 -0
- package/composables/process/useProcessWalkthroughs.ts +73 -0
- package/composables/process/useSendProcessStartForm.ts +43 -0
- package/composables/process/useUpdateProcessInstance.ts +40 -0
- package/composables/role/useCreateRole.ts +19 -0
- package/composables/role/useDeleteRole.ts +21 -0
- package/composables/role/useRole.ts +30 -0
- package/composables/role/useRoles.ts +25 -0
- package/composables/role/useUpdateRole.ts +22 -0
- package/composables/suite/useApps.ts +31 -0
- package/composables/suite/useSuite.ts +26 -0
- package/composables/tenant/useActiveTenant.ts +27 -0
- package/composables/tenant/useSysadminNavigation.ts +19 -0
- package/composables/tenant/useTenant.ts +38 -0
- package/composables/tenant/useTenantMemberships.ts +15 -0
- package/composables/tenant/useTenantPath.ts +20 -0
- package/composables/tenant/useTenantPolling.ts +30 -0
- package/composables/tenant/useTenantReady.ts +12 -0
- package/composables/theme/useDarkMode.ts +5 -0
- package/composables/thread/useThread.ts +27 -0
- package/composables/thread/useThreadEvents.ts +91 -0
- package/composables/thread/useThreadUtils.ts +49 -0
- package/composables/thread/useThreads.ts +64 -0
- package/composables/thread/useThreadsInfinite.ts +56 -0
- package/composables/translation/useTranslate.ts +20 -0
- package/composables/useRouteReady.ts +21 -0
- package/composables/useTimeAgo.ts +40 -0
- package/composables/user/useAssignRoleToUser.ts +22 -0
- package/composables/user/useMyUser.ts +25 -0
- package/composables/user/useRevokeRoleFromUser.ts +21 -0
- package/composables/user/useUser.ts +30 -0
- package/composables/user/useUsers.ts +63 -0
- package/composables/utils/useJsonTree.ts +138 -0
- package/formkit.config.ts +44 -0
- package/i18n/locales/de.yaml +815 -0
- package/i18n/locales/en.yaml +804 -0
- package/i18n/locales/fr.yaml +812 -0
- package/i18n/locales/it.yaml +808 -0
- package/layouts/anonymous.vue +8 -0
- package/layouts/default.vue +116 -0
- package/middleware/auth.global.ts +62 -0
- package/nuxt.config.ts +145 -0
- package/package.json +114 -0
- package/pages/[tenant]/index.vue +31 -0
- package/pages/[tenant]/notifications/index.vue +235 -0
- package/pages/[tenant]/service/agents/[agent_class]-[agent_id]/chat.vue +67 -0
- package/pages/[tenant]/service/agents/[agent_class]-[agent_id]/configuration.vue +122 -0
- package/pages/[tenant]/service/agents/[agent_class]-[agent_id]/memories/[memory_id].vue +3 -0
- package/pages/[tenant]/service/agents/[agent_class]-[agent_id]/memories.vue +20 -0
- package/pages/[tenant]/service/agents/[agent_class]-[agent_id]/overview.vue +72 -0
- package/pages/[tenant]/service/agents/[agent_class]-[agent_id]/threads.vue +52 -0
- package/pages/[tenant]/service/agents/[agent_class]-[agent_id]/workflow.vue +19 -0
- package/pages/[tenant]/service/agents/[agent_class]-[agent_id].vue +63 -0
- package/pages/[tenant]/service/agents/templates.vue +102 -0
- package/pages/[tenant]/service/agents.vue +185 -0
- package/pages/[tenant]/service/datasets/[dataset_id].vue +81 -0
- package/pages/[tenant]/service/datasets.vue +53 -0
- package/pages/[tenant]/service/health/index.vue +3 -0
- package/pages/[tenant]/service/knowledge/[db]/[namespace]/[document_id]/nodes.vue +20 -0
- package/pages/[tenant]/service/knowledge/[db]/[namespace]/[document_id]/overview.vue +40 -0
- package/pages/[tenant]/service/knowledge/[db]/[namespace]/[document_id]/summary.vue +88 -0
- package/pages/[tenant]/service/knowledge/[db]/[namespace]/[document_id].vue +48 -0
- package/pages/[tenant]/service/knowledge/[db]/[namespace].vue +144 -0
- package/pages/[tenant]/service/knowledge.vue +126 -0
- package/pages/[tenant]/service/models/[model_name].vue +84 -0
- package/pages/[tenant]/service/models.vue +61 -0
- package/pages/[tenant]/service/my-account.vue +117 -0
- package/pages/[tenant]/service/openai/[thread_id]/[display_id]/memories.vue +66 -0
- package/pages/[tenant]/service/openai/[thread_id]/[display_id]/sources.vue +100 -0
- package/pages/[tenant]/service/openai/[thread_id]/[display_id]/tracing.vue +49 -0
- package/pages/[tenant]/service/openai.vue +101 -0
- package/pages/[tenant]/service/organization-memories/graph.vue +97 -0
- package/pages/[tenant]/service/organization-memories/list/[memory_id].vue +3 -0
- package/pages/[tenant]/service/organization-memories/list.vue +150 -0
- package/pages/[tenant]/service/organization-memories.vue +3 -0
- package/pages/[tenant]/service/processes/[process_class]-[process_id]/[process_walkthrough_id].vue +7 -0
- package/pages/[tenant]/service/processes/[process_class]-[process_id]/configuration.vue +106 -0
- package/pages/[tenant]/service/processes/[process_class]-[process_id]/overview.vue +67 -0
- package/pages/[tenant]/service/processes/[process_class]-[process_id]/start.vue +26 -0
- package/pages/[tenant]/service/processes/[process_class]-[process_id]/walkthroughs/[process_walkthrough_id]/overview.vue +14 -0
- package/pages/[tenant]/service/processes/[process_class]-[process_id]/walkthroughs.vue +54 -0
- package/pages/[tenant]/service/processes/[process_class]-[process_id].vue +60 -0
- package/pages/[tenant]/service/processes.vue +129 -0
- package/pages/[tenant]/service/roles/[role_id].vue +54 -0
- package/pages/[tenant]/service/roles.vue +84 -0
- package/pages/[tenant]/service/threads/[thread_id]/chat.vue +51 -0
- package/pages/[tenant]/service/threads/[thread_id]/display/[display_id].vue +21 -0
- package/pages/[tenant]/service/threads/[thread_id]/display.vue +29 -0
- package/pages/[tenant]/service/threads/[thread_id]/hierarchy.vue +14 -0
- package/pages/[tenant]/service/threads/[thread_id]/memories/[memory_id].vue +3 -0
- package/pages/[tenant]/service/threads/[thread_id]/memories.vue +19 -0
- package/pages/[tenant]/service/threads/[thread_id]/overview.vue +100 -0
- package/pages/[tenant]/service/threads/[thread_id].vue +54 -0
- package/pages/[tenant]/service/threads.vue +52 -0
- package/pages/[tenant]/service/user-memories/graph.vue +97 -0
- package/pages/[tenant]/service/user-memories/list/[memory_id].vue +3 -0
- package/pages/[tenant]/service/user-memories/list.vue +150 -0
- package/pages/[tenant]/service/user-memories.vue +3 -0
- package/pages/[tenant]/service/users/[user_id].vue +117 -0
- package/pages/[tenant]/service/users.vue +88 -0
- package/pages/auth/callback.vue +52 -0
- package/pages/auth/login.vue +80 -0
- package/pages/auth/renew.vue +24 -0
- package/pages/index.vue +59 -0
- package/pages/select-tenant.vue +76 -0
- package/plugins/0.runtime-config.client.ts +55 -0
- package/plugins/apexcharts.client.ts +5 -0
- package/plugins/api-client.client.ts +38 -0
- package/plugins/dark-mode.client.ts +12 -0
- package/plugins/keycloak-client.ts +41 -0
- package/plugins/oidc-client.ts +78 -0
- package/sdk/client/client/client.gen.ts +237 -0
- package/sdk/client/client/index.ts +24 -0
- package/sdk/client/client/types.gen.ts +213 -0
- package/sdk/client/client/utils.gen.ts +407 -0
- package/sdk/client/client.gen.ts +25 -0
- package/sdk/client/core/auth.gen.ts +42 -0
- package/sdk/client/core/bodySerializer.gen.ts +96 -0
- package/sdk/client/core/params.gen.ts +181 -0
- package/sdk/client/core/pathSerializer.gen.ts +180 -0
- package/sdk/client/core/queryKeySerializer.gen.ts +136 -0
- package/sdk/client/core/serverSentEvents.gen.ts +265 -0
- package/sdk/client/core/types.gen.ts +118 -0
- package/sdk/client/core/utils.gen.ts +143 -0
- package/sdk/client/index.ts +1013 -0
- package/sdk/client/schemas.gen.ts +35395 -0
- package/sdk/client/sdk.gen.ts +3438 -0
- package/sdk/client/transformers.gen.ts +143 -0
- package/sdk/client/types.gen.ts +27567 -0
- package/tailwind.config.mjs +27 -0
- package/themes/aihub-theme.ts +125 -0
- package/types/DashboardWidget.ts +13 -0
- package/types/EventChartInput.ts +7 -0
- package/types/NavItem.ts +6 -0
- package/types/TimeseriesInput.ts +7 -0
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
class="flex w-full"
|
|
4
|
+
:class="justifyClass"
|
|
5
|
+
>
|
|
6
|
+
<div
|
|
7
|
+
class="flex max-w-[80%] gap-2"
|
|
8
|
+
:class="flowClass"
|
|
9
|
+
>
|
|
10
|
+
<Avatar
|
|
11
|
+
size="large"
|
|
12
|
+
:shape="message.role == 'user' ? 'circle' : 'square'"
|
|
13
|
+
class="shrink-0"
|
|
14
|
+
:image="image"
|
|
15
|
+
:class="{ 'bg-surface-800 text-white dark:bg-surface-200 dark:text-black': message.role == 'user' }"
|
|
16
|
+
>
|
|
17
|
+
<Icon
|
|
18
|
+
v-if="icon"
|
|
19
|
+
:name="message.role == 'user' ? 'mage:user' : icon"
|
|
20
|
+
size="xl"
|
|
21
|
+
/>
|
|
22
|
+
</Avatar>
|
|
23
|
+
<div class="flex w-full flex-col">
|
|
24
|
+
<div
|
|
25
|
+
class="mb-1 line-clamp-1 flex items-center gap-2 text-black dark:text-white"
|
|
26
|
+
:class="justifyClass"
|
|
27
|
+
>
|
|
28
|
+
<p class="text-sm font-bold">
|
|
29
|
+
{{ name }}
|
|
30
|
+
</p>
|
|
31
|
+
<p class="text-xs">
|
|
32
|
+
{{ email }}
|
|
33
|
+
</p>
|
|
34
|
+
</div>
|
|
35
|
+
<div
|
|
36
|
+
class="mb-1 w-full max-w-[90%] rounded-3xl bg-surface-50 px-5 pb-4 pt-2 text-lg dark:bg-surface-850"
|
|
37
|
+
>
|
|
38
|
+
<div
|
|
39
|
+
v-for="(block, index) in message.blocks"
|
|
40
|
+
:key="index"
|
|
41
|
+
:class="{
|
|
42
|
+
'cursor-pointer': isClickable,
|
|
43
|
+
'hover:opacity-80 hover:shadow-md': isClickable,
|
|
44
|
+
'': message.role == 'user',
|
|
45
|
+
}"
|
|
46
|
+
>
|
|
47
|
+
<MarkdownRenderer
|
|
48
|
+
v-if="block?.block_type === 'text'"
|
|
49
|
+
:md="block.text"
|
|
50
|
+
/>
|
|
51
|
+
<img
|
|
52
|
+
v-if="block?.block_type === 'image'"
|
|
53
|
+
:src="block.url"
|
|
54
|
+
>
|
|
55
|
+
</div>
|
|
56
|
+
</div>
|
|
57
|
+
|
|
58
|
+
<span
|
|
59
|
+
v-if="props.date"
|
|
60
|
+
class="ml-0.5 flex w-full translate-y-px text-xs font-medium text-surface-400"
|
|
61
|
+
>
|
|
62
|
+
{{ useDateFormat(props.date, 'DD.MM.YYYY HH:mm:ss') }}
|
|
63
|
+
</span>
|
|
64
|
+
</div>
|
|
65
|
+
</div>
|
|
66
|
+
</div>
|
|
67
|
+
</template>
|
|
68
|
+
|
|
69
|
+
<script setup lang="ts">
|
|
70
|
+
import { computed } from 'vue'
|
|
71
|
+
|
|
72
|
+
import type { ChatMessage } from '@core/sdk/client'
|
|
73
|
+
|
|
74
|
+
const props = defineProps<{
|
|
75
|
+
message: ChatMessage
|
|
76
|
+
name: string
|
|
77
|
+
email?: string
|
|
78
|
+
date?: Date
|
|
79
|
+
image?: string
|
|
80
|
+
icon?: string
|
|
81
|
+
isClickable?: boolean
|
|
82
|
+
}>()
|
|
83
|
+
|
|
84
|
+
const justifyClass = computed<string[]>(() => {
|
|
85
|
+
return [props.message.role === 'user' ? 'justify-end' : 'justify-start']
|
|
86
|
+
})
|
|
87
|
+
const flowClass = computed<string[]>(() => {
|
|
88
|
+
return [props.message.role === 'user' ? 'flex-row-reverse' : 'flex-row']
|
|
89
|
+
})
|
|
90
|
+
</script>
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="flex flex-col gap-4">
|
|
3
|
+
<div class="flex items-center gap-6 text-sm text-surface-600 dark:text-surface-400">
|
|
4
|
+
<div class="flex items-center gap-2">
|
|
5
|
+
<Icon
|
|
6
|
+
name="mage:file"
|
|
7
|
+
class="size-4"
|
|
8
|
+
/>
|
|
9
|
+
<span>{{ t('event.retriever.sourceDocument', documentCount) }}</span>
|
|
10
|
+
</div>
|
|
11
|
+
<div class="flex items-center gap-2">
|
|
12
|
+
<Icon
|
|
13
|
+
name="mage:checklist"
|
|
14
|
+
class="size-4"
|
|
15
|
+
/>
|
|
16
|
+
<span>{{ t('event.retriever.contentChunk', totalNodeCount) }}</span>
|
|
17
|
+
</div>
|
|
18
|
+
</div>
|
|
19
|
+
|
|
20
|
+
<div
|
|
21
|
+
v-if="totalNodeCount === 0"
|
|
22
|
+
class="flex flex-col items-center gap-3 rounded-lg p-8 text-center"
|
|
23
|
+
>
|
|
24
|
+
<Icon
|
|
25
|
+
name="mage:cancel"
|
|
26
|
+
class="size-8 text-surface-400"
|
|
27
|
+
/>
|
|
28
|
+
<div>
|
|
29
|
+
<p class="font-medium text-surface-700 dark:text-surface-300">
|
|
30
|
+
{{ t('event.retriever.noChunksFound') }}
|
|
31
|
+
</p>
|
|
32
|
+
<p class="text-sm text-surface-500 dark:text-surface-400">
|
|
33
|
+
{{ t('event.retriever.noChunksFoundDescription') }}
|
|
34
|
+
</p>
|
|
35
|
+
</div>
|
|
36
|
+
</div>
|
|
37
|
+
|
|
38
|
+
<div
|
|
39
|
+
v-else
|
|
40
|
+
class="flex flex-col gap-3"
|
|
41
|
+
>
|
|
42
|
+
<div
|
|
43
|
+
v-for="(documentNodes, doc) in nodesByDocument"
|
|
44
|
+
:key="doc"
|
|
45
|
+
class="rounded-lg border border-surface-200 dark:border-surface-700"
|
|
46
|
+
>
|
|
47
|
+
<div
|
|
48
|
+
v-if="getDocumentTitle(documentNodes)"
|
|
49
|
+
class="flex items-center justify-between border-b border-surface-100 px-4 py-3 dark:border-surface-700"
|
|
50
|
+
>
|
|
51
|
+
<div class="flex items-center gap-2">
|
|
52
|
+
<Icon
|
|
53
|
+
name="mage:file"
|
|
54
|
+
class="size-4 text-surface-500"
|
|
55
|
+
/>
|
|
56
|
+
<h3 class="font-medium text-surface-700 dark:text-surface-300">
|
|
57
|
+
{{ getDocumentTitle(documentNodes) }}
|
|
58
|
+
</h3>
|
|
59
|
+
</div>
|
|
60
|
+
<span class="text-xs text-surface-500 dark:text-surface-400">
|
|
61
|
+
{{ t('event.retriever.chunksFromDoc', documentNodes.length) }}
|
|
62
|
+
</span>
|
|
63
|
+
</div>
|
|
64
|
+
|
|
65
|
+
<div class="p-4">
|
|
66
|
+
<div class="flex flex-col gap-3">
|
|
67
|
+
<KnowledgeNodeContent
|
|
68
|
+
v-for="node in documentNodes"
|
|
69
|
+
:key="node.id"
|
|
70
|
+
:node="node"
|
|
71
|
+
:always-show-score="true"
|
|
72
|
+
/>
|
|
73
|
+
</div>
|
|
74
|
+
</div>
|
|
75
|
+
</div>
|
|
76
|
+
</div>
|
|
77
|
+
</div>
|
|
78
|
+
</template>
|
|
79
|
+
|
|
80
|
+
<script setup lang="ts">
|
|
81
|
+
import type { IngestedNode } from '@core/sdk/client'
|
|
82
|
+
|
|
83
|
+
const props = defineProps<{
|
|
84
|
+
nodes: IngestedNode[]
|
|
85
|
+
}>()
|
|
86
|
+
|
|
87
|
+
const { t } = useI18n()
|
|
88
|
+
|
|
89
|
+
const nodesByDocument = computed<Record<string, IngestedNode[]>>(() => {
|
|
90
|
+
const nodeMap: Record<string, IngestedNode[]> = {}
|
|
91
|
+
props.nodes.forEach((node: IngestedNode) => {
|
|
92
|
+
if (!(node.document_id in nodeMap)) {
|
|
93
|
+
nodeMap[node.document_id] = []
|
|
94
|
+
}
|
|
95
|
+
nodeMap[node.document_id].push(node)
|
|
96
|
+
})
|
|
97
|
+
return nodeMap
|
|
98
|
+
})
|
|
99
|
+
|
|
100
|
+
const documentCount = computed(() => {
|
|
101
|
+
return Object.keys(nodesByDocument.value).length
|
|
102
|
+
})
|
|
103
|
+
|
|
104
|
+
const totalNodeCount = computed(() => {
|
|
105
|
+
return props.nodes.length
|
|
106
|
+
})
|
|
107
|
+
|
|
108
|
+
const getDocumentTitle = (nodes: IngestedNode[]): string => {
|
|
109
|
+
const nodeWithTitle = nodes.find(node => node.document_title?.trim())
|
|
110
|
+
if (nodeWithTitle?.document_title) {
|
|
111
|
+
return nodeWithTitle.document_title.trim()
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
const nodeWithSource = nodes.find(node => node.source?.trim())
|
|
115
|
+
if (nodeWithSource?.source) {
|
|
116
|
+
return nodeWithSource.source
|
|
117
|
+
}
|
|
118
|
+
return ''
|
|
119
|
+
}
|
|
120
|
+
</script>
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="flex flex-col gap-8">
|
|
3
|
+
<div
|
|
4
|
+
v-for="(message, index) in messages"
|
|
5
|
+
:key="index"
|
|
6
|
+
class="flex flex-col gap-2"
|
|
7
|
+
>
|
|
8
|
+
<ChatMessage
|
|
9
|
+
is-clickable
|
|
10
|
+
:message="message"
|
|
11
|
+
:name="message.name"
|
|
12
|
+
:email="message.email"
|
|
13
|
+
:date="message.date"
|
|
14
|
+
:image="message.userImage"
|
|
15
|
+
:icon="message.icon"
|
|
16
|
+
@click="() => toDisplay(message)"
|
|
17
|
+
/>
|
|
18
|
+
</div>
|
|
19
|
+
</div>
|
|
20
|
+
</template>
|
|
21
|
+
|
|
22
|
+
<script setup lang="ts">
|
|
23
|
+
import type {
|
|
24
|
+
ChatMessage,
|
|
25
|
+
MinimalAgentInstanceDto,
|
|
26
|
+
ThreadDto,
|
|
27
|
+
MinimalUserDto,
|
|
28
|
+
ContextualizedAgentEvent,
|
|
29
|
+
} from '@core/sdk/client'
|
|
30
|
+
|
|
31
|
+
const props = defineProps<{
|
|
32
|
+
events: ContextualizedAgentEvent[]
|
|
33
|
+
thread: ThreadDto
|
|
34
|
+
}>()
|
|
35
|
+
|
|
36
|
+
const router = useRouter()
|
|
37
|
+
const tenantPath = useTenantPath()
|
|
38
|
+
const { t } = useI18n()
|
|
39
|
+
|
|
40
|
+
type ExtendedChatMessage = ChatMessage & {
|
|
41
|
+
name: string
|
|
42
|
+
email: string
|
|
43
|
+
date: Date
|
|
44
|
+
userImage?: string
|
|
45
|
+
icon?: string
|
|
46
|
+
displayId: string
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
const user = computed<MinimalUserDto>(() => props.thread.users.at(-1)!)
|
|
50
|
+
|
|
51
|
+
const getAgentDto = (agent_class: string, agent_id: string) =>
|
|
52
|
+
props.thread.participating_agents?.find(
|
|
53
|
+
(agent: MinimalAgentInstanceDto) =>
|
|
54
|
+
agent.agent_id === agent_id && agent.agent_class === agent_class,
|
|
55
|
+
)
|
|
56
|
+
|
|
57
|
+
const toDisplay = (msg: ExtendedChatMessage) => {
|
|
58
|
+
router.push(tenantPath(`/service/threads/${props.thread.id}/display/${msg.displayId}`))
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
const createUserMessage = (
|
|
62
|
+
blocks: ChatMessage['blocks'],
|
|
63
|
+
timestamp: number,
|
|
64
|
+
event: ContextualizedAgentEvent,
|
|
65
|
+
): ExtendedChatMessage => ({
|
|
66
|
+
role: 'user',
|
|
67
|
+
blocks,
|
|
68
|
+
displayId: event.display_id,
|
|
69
|
+
name: user.value.name,
|
|
70
|
+
email: user.value.email,
|
|
71
|
+
userImage: user.value.profile_image,
|
|
72
|
+
date: new Date(timestamp / 1_000_000),
|
|
73
|
+
})
|
|
74
|
+
|
|
75
|
+
const createAssistantMessage = (
|
|
76
|
+
text: string,
|
|
77
|
+
event: ContextualizedAgentEvent,
|
|
78
|
+
timestamp: number,
|
|
79
|
+
): ExtendedChatMessage => {
|
|
80
|
+
const agentDto = getAgentDto(event.agent_class, event.agent_id)
|
|
81
|
+
return {
|
|
82
|
+
role: 'assistant',
|
|
83
|
+
blocks: [{ block_type: 'text', text }],
|
|
84
|
+
displayId: event.display_id,
|
|
85
|
+
name: agentDto?.agent_config?.name ?? t('chat.assistant'),
|
|
86
|
+
email: `${event.agent_class}/${event.agent_id}`,
|
|
87
|
+
icon: agentDto?.agent_config?.icon,
|
|
88
|
+
date: new Date(timestamp / 1_000_000),
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
const messages = computed<ExtendedChatMessage[]>(() => {
|
|
93
|
+
const msgs: ExtendedChatMessage[] = []
|
|
94
|
+
|
|
95
|
+
for (const event of props.events) {
|
|
96
|
+
const { _parent_event_names: types, created_at } = event.event
|
|
97
|
+
|
|
98
|
+
if (types.includes('UserMessageEvent')) {
|
|
99
|
+
const blocks = event.event.messages.at(-1)?.blocks ?? []
|
|
100
|
+
msgs.push(createUserMessage(blocks, created_at, event))
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
else if (types.includes('HumanInTheLoopResponseEvent')) {
|
|
104
|
+
msgs.push(createUserMessage(
|
|
105
|
+
[{ block_type: 'text', text: event.event.response }],
|
|
106
|
+
created_at,
|
|
107
|
+
event,
|
|
108
|
+
))
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
else if (types.includes('ChunkEvent') && event.event.content) {
|
|
112
|
+
const lastMsg = msgs.at(-1)
|
|
113
|
+
const isSameAgent = lastMsg?.email === `${event.agent_class}/${event.agent_id}`
|
|
114
|
+
|
|
115
|
+
if (isSameAgent && lastMsg?.role === 'assistant') {
|
|
116
|
+
lastMsg.blocks.push({ block_type: 'text', text: event.event.content })
|
|
117
|
+
}
|
|
118
|
+
else {
|
|
119
|
+
msgs.push(createAssistantMessage(event.event.content, event, created_at))
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
else if (types.includes('HumanInTheLoopRequestEvent')) {
|
|
124
|
+
msgs.push(createAssistantMessage(event.event.question, event, created_at))
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
else if (types.includes('ExceptionEvent')) {
|
|
128
|
+
msgs.push(createAssistantMessage(event.event.message, event, created_at))
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
return msgs
|
|
133
|
+
})
|
|
134
|
+
</script>
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<table class="w-full table-auto text-left">
|
|
3
|
+
<thead>
|
|
4
|
+
<tr>
|
|
5
|
+
<th />
|
|
6
|
+
<th>{{ t('costs.table.count') }}</th>
|
|
7
|
+
<th>{{ t('costs.table.cost') }}</th>
|
|
8
|
+
</tr>
|
|
9
|
+
</thead>
|
|
10
|
+
<tbody>
|
|
11
|
+
<tr>
|
|
12
|
+
<td class="font-bold">
|
|
13
|
+
{{ t('costs.table.input') }}
|
|
14
|
+
</td>
|
|
15
|
+
<td>{{ promptTokenCount }} </td>
|
|
16
|
+
<td>{{ promptTokensCosts }} {{ t('costs.table.currency') }}</td>
|
|
17
|
+
</tr>
|
|
18
|
+
<tr>
|
|
19
|
+
<td class="font-bold">
|
|
20
|
+
{{ t('costs.table.output') }}
|
|
21
|
+
</td>
|
|
22
|
+
<td>{{ completionTokenCount }}</td>
|
|
23
|
+
<td>{{ completionTokensCosts }} {{ t('costs.table.currency') }}</td>
|
|
24
|
+
</tr>
|
|
25
|
+
<tr v-if="embeddingTokenCount">
|
|
26
|
+
<td class="font-bold">
|
|
27
|
+
{{ t('costs.table.embedding') }}
|
|
28
|
+
</td>
|
|
29
|
+
<td>{{ embeddingTokenCount }}</td>
|
|
30
|
+
<td>{{ embeddingTokensCosts }} {{ t('costs.table.currency') }}</td>
|
|
31
|
+
</tr>
|
|
32
|
+
<tr
|
|
33
|
+
class="font-bold"
|
|
34
|
+
>
|
|
35
|
+
<td>
|
|
36
|
+
{{ t('costs.table.total') }}
|
|
37
|
+
</td>
|
|
38
|
+
<td>{{ promptTokenCount + completionTokenCount + embeddingTokenCount }}</td>
|
|
39
|
+
<td>{{ promptTokensCosts + completionTokensCosts + embeddingTokensCosts }} {{ t('costs.table.currency') }}</td>
|
|
40
|
+
</tr>
|
|
41
|
+
</tbody>
|
|
42
|
+
</table>
|
|
43
|
+
</template>
|
|
44
|
+
|
|
45
|
+
<script setup lang="ts">
|
|
46
|
+
defineProps<{
|
|
47
|
+
promptTokenCount: number
|
|
48
|
+
promptTokensCosts: number
|
|
49
|
+
completionTokenCount: number
|
|
50
|
+
completionTokensCosts: number
|
|
51
|
+
embeddingTokenCount: number
|
|
52
|
+
embeddingTokensCosts: number
|
|
53
|
+
}>()
|
|
54
|
+
|
|
55
|
+
const { t } = useI18n()
|
|
56
|
+
</script>
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="relative">
|
|
3
|
+
<div class="flex flex-col gap-1">
|
|
4
|
+
<div class="flex items-baseline gap-4">
|
|
5
|
+
<p class="text-lg font-medium">
|
|
6
|
+
{{ title }}
|
|
7
|
+
</p>
|
|
8
|
+
<p
|
|
9
|
+
class="text-surface-500"
|
|
10
|
+
>
|
|
11
|
+
{{ agentName }}
|
|
12
|
+
</p>
|
|
13
|
+
<DashboardTrend :timeseries="timeseries" />
|
|
14
|
+
</div>
|
|
15
|
+
</div>
|
|
16
|
+
<div class="absolute inset-x-0 top-0">
|
|
17
|
+
<EventTimeseries
|
|
18
|
+
:title="title"
|
|
19
|
+
:series-inputs="seriesInput"
|
|
20
|
+
:height="250"
|
|
21
|
+
/>
|
|
22
|
+
</div>
|
|
23
|
+
</div>
|
|
24
|
+
</template>
|
|
25
|
+
|
|
26
|
+
<script setup lang="ts">
|
|
27
|
+
import { computed } from 'vue'
|
|
28
|
+
|
|
29
|
+
import type { EventTimeseries as EventTimeseriesType } from '@core/sdk/client'
|
|
30
|
+
import type { DashboardWidget } from '@core/types/DashboardWidget'
|
|
31
|
+
import type { TimeseriesInput } from '@core/types/TimeseriesInput'
|
|
32
|
+
|
|
33
|
+
const props = defineProps<{
|
|
34
|
+
title: string
|
|
35
|
+
timeseries: EventTimeseriesType
|
|
36
|
+
widgetData: DashboardWidget
|
|
37
|
+
}>()
|
|
38
|
+
|
|
39
|
+
const seriesInput = computed<TimeseriesInput[]>(() => [{
|
|
40
|
+
name: props.title,
|
|
41
|
+
color: 'var(--p-surface-600)',
|
|
42
|
+
timeseries: props.timeseries,
|
|
43
|
+
}])
|
|
44
|
+
|
|
45
|
+
const { agentName } = useAgentNameFromDashboardWidget(props.widgetData)
|
|
46
|
+
</script>
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="relative">
|
|
3
|
+
<div class="flex flex-col gap-1">
|
|
4
|
+
<div class="flex gap-4">
|
|
5
|
+
<p class="text-lg font-medium">
|
|
6
|
+
{{ title }}
|
|
7
|
+
</p>
|
|
8
|
+
<DashboardTrend :timeseries="timeseries" />
|
|
9
|
+
</div>
|
|
10
|
+
<p
|
|
11
|
+
class="text-surface-500"
|
|
12
|
+
>
|
|
13
|
+
{{ agentName }}
|
|
14
|
+
</p>
|
|
15
|
+
</div>
|
|
16
|
+
<ClientOnly>
|
|
17
|
+
<div class="absolute inset-x-0 top-0">
|
|
18
|
+
<VueApexChart
|
|
19
|
+
v-if="chartSeries && chartOptions"
|
|
20
|
+
type="area"
|
|
21
|
+
height="250px"
|
|
22
|
+
:options="chartOptions"
|
|
23
|
+
:series="chartSeries"
|
|
24
|
+
/>
|
|
25
|
+
</div>
|
|
26
|
+
</ClientOnly>
|
|
27
|
+
</div>
|
|
28
|
+
</template>
|
|
29
|
+
|
|
30
|
+
<script setup lang="ts">
|
|
31
|
+
import { computed } from 'vue'
|
|
32
|
+
import VueApexChart from 'vue3-apexcharts'
|
|
33
|
+
|
|
34
|
+
import type { EventTimeseries, EventBucket } from '@core/sdk/client'
|
|
35
|
+
import type { DashboardWidget } from '@core/types/DashboardWidget'
|
|
36
|
+
import type { ApexOptions } from 'apexcharts'
|
|
37
|
+
|
|
38
|
+
const props = defineProps<{
|
|
39
|
+
title: string
|
|
40
|
+
timeseries: EventTimeseries
|
|
41
|
+
widgetData: DashboardWidget
|
|
42
|
+
}>()
|
|
43
|
+
|
|
44
|
+
const isDark = useDarkMode()
|
|
45
|
+
const { t } = useI18n()
|
|
46
|
+
|
|
47
|
+
const { agentName } = useAgentNameFromDashboardWidget(props.widgetData)
|
|
48
|
+
|
|
49
|
+
const chartSeries = computed(() => {
|
|
50
|
+
if (!props.timeseries?.buckets?.length) {
|
|
51
|
+
return [{ data: [] }]
|
|
52
|
+
}
|
|
53
|
+
return [{
|
|
54
|
+
name: props.title || 'Events',
|
|
55
|
+
data: props.timeseries.buckets.map((bucket: EventBucket) => ({
|
|
56
|
+
x: new Date(bucket.start_time).getTime(),
|
|
57
|
+
y: bucket.total_events ?? 0,
|
|
58
|
+
})),
|
|
59
|
+
}]
|
|
60
|
+
})
|
|
61
|
+
|
|
62
|
+
const chartOptions = computed<ApexOptions>(() => {
|
|
63
|
+
const lineColor = isDark.value ? '#9CA3AF' : '#374151' // gray-400 for dark, gray-700 for light
|
|
64
|
+
const gradientOpacityFrom = isDark.value ? 0.5 : 0.6
|
|
65
|
+
const gradientOpacityTo = isDark.value ? 0.05 : 0.1
|
|
66
|
+
|
|
67
|
+
return {
|
|
68
|
+
colors: [lineColor],
|
|
69
|
+
chart: {
|
|
70
|
+
type: 'area',
|
|
71
|
+
height: '250px',
|
|
72
|
+
sparkline: {
|
|
73
|
+
enabled: true,
|
|
74
|
+
},
|
|
75
|
+
animations: {
|
|
76
|
+
enabled: true,
|
|
77
|
+
easing: 'smooth',
|
|
78
|
+
speed: 600,
|
|
79
|
+
animateGradually: {
|
|
80
|
+
enabled: true,
|
|
81
|
+
delay: 100,
|
|
82
|
+
},
|
|
83
|
+
dynamicAnimation: {
|
|
84
|
+
enabled: true,
|
|
85
|
+
speed: 300,
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
stroke: {
|
|
90
|
+
curve: 'smooth',
|
|
91
|
+
width: 2.5,
|
|
92
|
+
},
|
|
93
|
+
fill: {
|
|
94
|
+
type: 'gradient',
|
|
95
|
+
gradient: {
|
|
96
|
+
shadeIntensity: isDark.value ? 0.7 : 1,
|
|
97
|
+
opacityFrom: gradientOpacityFrom,
|
|
98
|
+
opacityTo: gradientOpacityTo,
|
|
99
|
+
// Removed stops for a linear gradient from opacityFrom to opacityTo
|
|
100
|
+
// To make it more like the desired image where the top has more body:
|
|
101
|
+
stops: [0, 85, 100], // Full opacityFrom for first 85% then fade
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
tooltip: {
|
|
105
|
+
enabled: true,
|
|
106
|
+
theme: isDark.value ? 'dark' : 'light',
|
|
107
|
+
style: {
|
|
108
|
+
fontSize: '12px',
|
|
109
|
+
},
|
|
110
|
+
x: {
|
|
111
|
+
show: true,
|
|
112
|
+
format: 'dd MMM HH:mm',
|
|
113
|
+
},
|
|
114
|
+
y: {
|
|
115
|
+
title: {
|
|
116
|
+
formatter: (seriesName: string) => `${seriesName}: `,
|
|
117
|
+
},
|
|
118
|
+
formatter: (value: number) => {
|
|
119
|
+
return String(Math.round(value))
|
|
120
|
+
},
|
|
121
|
+
},
|
|
122
|
+
marker: {
|
|
123
|
+
show: true,
|
|
124
|
+
},
|
|
125
|
+
},
|
|
126
|
+
noData: {
|
|
127
|
+
text: t('chart.no_data'),
|
|
128
|
+
align: 'center',
|
|
129
|
+
verticalAlign: 'middle',
|
|
130
|
+
offsetX: 0,
|
|
131
|
+
offsetY: 0,
|
|
132
|
+
style: {
|
|
133
|
+
fontSize: '12px',
|
|
134
|
+
},
|
|
135
|
+
},
|
|
136
|
+
}
|
|
137
|
+
})
|
|
138
|
+
</script>
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="pointer-events-none relative w-full">
|
|
3
|
+
<p class="pointer-events-none -mt-8 w-full text-center text-[12rem] font-medium opacity-70">
|
|
4
|
+
{{ sum }}
|
|
5
|
+
</p>
|
|
6
|
+
<span class="absolute bottom-8 w-full text-center text-lg font-bold opacity-80">{{ title }}</span>
|
|
7
|
+
<span
|
|
8
|
+
class="absolute bottom-2 w-full text-center text-surface-500"
|
|
9
|
+
>
|
|
10
|
+
{{ agentName }}
|
|
11
|
+
</span>
|
|
12
|
+
<div class="absolute -bottom-6 flex w-full justify-center">
|
|
13
|
+
<DashboardTrend :timeseries="timeseries" />
|
|
14
|
+
</div>
|
|
15
|
+
</div>
|
|
16
|
+
</template>
|
|
17
|
+
|
|
18
|
+
<script setup lang="ts">
|
|
19
|
+
import type { EventTimeseries } from '@core/sdk/client'
|
|
20
|
+
import type { DashboardWidget } from '@core/types/DashboardWidget'
|
|
21
|
+
|
|
22
|
+
const props = defineProps<{
|
|
23
|
+
title: string
|
|
24
|
+
timeseries: EventTimeseries
|
|
25
|
+
widgetData: DashboardWidget
|
|
26
|
+
}>()
|
|
27
|
+
|
|
28
|
+
const { sum } = useEventTimeseriesStats(props.timeseries)
|
|
29
|
+
|
|
30
|
+
const { agentName } = useAgentNameFromDashboardWidget(props.widgetData)
|
|
31
|
+
</script>
|