Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import type { AlertModel } from '@/schema/alert-manager/alert/model';
import { i18n } from '@/translations';

import { useAllReferenceStore } from '@/store/reference/all-reference-store';
import type { AppReferenceMap } from '@/store/reference/app-reference-store';
import type { ServiceReferenceMap } from '@/store/reference/service-reference-store';
import type { WebhookReferenceMap } from '@/store/reference/webhook-reference-store';
import { useUserStore } from '@/store/user/user-store';
Expand Down Expand Up @@ -65,6 +66,7 @@ const route = useRoute();

const storeState = reactive({
webhook: computed<WebhookReferenceMap>(() => allReferenceGetters.webhook),
app: computed<AppReferenceMap>(() => allReferenceGetters.app),
serviceList: computed<ServiceReferenceMap>(() => allReferenceGetters.service),
serviceId: computed<string>(() => serviceDetailPageState.serviceInfo?.service_id),
totalCount: computed<number>(() => alertPageState.totalAlertCount),
Expand Down Expand Up @@ -149,6 +151,9 @@ const getCreatedByNames = (id: string): string => {
if (id.includes('webhook')) {
return storeState.webhook[id]?.label || id;
}
if (id.includes('app')) {
return storeState.app[id]?.label || id;
}
return id;
};
const getServiceName = (id: string): TranslateResult => {
Expand Down Expand Up @@ -218,7 +223,7 @@ const handleExportToExcel = async () => {
status: i.status,
urgency: i.urgency,
labels: i.labels,
triggered_by: i.triggered_by,
triggered_by: getCreatedByNames(i.triggered_by),
created_at: i.created_at,
}));
await downloadExcel({
Expand Down
Loading