@@ -5,11 +5,11 @@ import { storeToRefs } from "pinia";
5
5
import SortableColumn from " ../SortableColumn.vue" ;
6
6
import { MessageStatus } from " @/resources/Message" ;
7
7
import moment from " moment" ;
8
- import { useFormatTime } from " @/composables/formatter" ;
9
8
import RefreshConfig from " ../RefreshConfig.vue" ;
10
9
import ItemsPerPage from " ../ItemsPerPage.vue" ;
11
10
import PaginationStrip from " ../PaginationStrip.vue" ;
12
11
import { useRoute } from " vue-router" ;
12
+ import { friendlyTypeName , formatDotNetTimespan } from " ../messages2/utils" ;
13
13
14
14
const store = useAuditStore ();
15
15
const { messages, sortByInstances, itemsPerPage, selectedPage, totalCount } = storeToRefs (store );
@@ -48,21 +48,6 @@ function statusToIcon(messageStatus: MessageStatus) {
48
48
return " fa retry-issued" ;
49
49
}
50
50
}
51
-
52
- function friendlyTypeName(messageType : string ) {
53
- if (messageType == null ) return null ;
54
-
55
- const typeClass = messageType .split (" ," )[0 ];
56
- const typeName = typeClass .split (" ." ).reverse ()[0 ];
57
- return typeName .replace (/ \+ / g , " ." );
58
- }
59
-
60
- function formatDotNetTimespan(timespan : string ) {
61
- // assuming if we have days in the timespan then something is very, very wrong
62
- const [hh, mm, ss] = timespan .split (" :" );
63
- const time = useFormatTime (((parseInt (hh ) * 60 + parseInt (mm )) * 60 + parseFloat (ss )) * 1000 );
64
- return ` ${time .value } ${time .unit } ` ;
65
- }
66
51
</script >
67
52
68
53
<template >
0 commit comments