This repository was archived by the owner on Jul 30, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
plugins/plugin-kubectl/src/lib/view/modes/Summary/impl Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change 28
28
*
29
29
*/
30
30
31
+ import { i18n } from '@kui-shell/core'
31
32
import prettyPrintMillis from 'pretty-ms'
33
+
32
34
import toDescriptionList from './convert'
33
35
import { Event } from '../../../../model/resource'
34
36
37
+ const strings = i18n ( 'plugin-kubectl' , 'events' )
38
+
35
39
export default function EventSummary ( event : Event ) {
36
40
const {
37
- metadata,
38
41
involvedObject,
39
42
source,
40
43
reason : Reason ,
@@ -46,15 +49,14 @@ export default function EventSummary(event: Event) {
46
49
} = event
47
50
48
51
return toDescriptionList ( {
49
- 'Last seen' : prettyPrintMillis ( Date . now ( ) - new Date ( lastTimestamp ) . getTime ( ) ) ,
52
+ 'Last seen' : strings ( 'ago' , prettyPrintMillis ( Date . now ( ) - new Date ( lastTimestamp ) . getTime ( ) ) ) ,
50
53
Object : `${ involvedObject . kind } /${ involvedObject . name } ` ,
54
+ Message,
51
55
Type,
52
56
Reason,
53
57
Subobject : involvedObject . fieldPath ,
54
58
Source : `${ source . component || '' } ${ source . host ? ( source . component ? ', ' : '' ) + source . host : '' } ` ,
55
- Message,
56
- 'First seen' : prettyPrintMillis ( Date . now ( ) - new Date ( firstTimestamp ) . getTime ( ) ) ,
57
- Count,
58
- Name : metadata . name
59
+ 'First seen' : strings ( 'ago' , prettyPrintMillis ( Date . now ( ) - new Date ( firstTimestamp ) . getTime ( ) ) ) ,
60
+ Count
59
61
} )
60
62
}
You can’t perform that action at this time.
0 commit comments