@skyhook-io/k8s-ui 1.7.1 → 1.7.2
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/package.json
CHANGED
|
@@ -25,6 +25,13 @@ describe('kindToPlural', () => {
|
|
|
25
25
|
expect(kindToPlural('NetworkPolicy')).toBe('networkpolicies')
|
|
26
26
|
})
|
|
27
27
|
|
|
28
|
+
test('handles already-plural kind names (Endpoints)', () => {
|
|
29
|
+
// The Kind "Endpoints" IS its resource name; englishPlural would wrongly
|
|
30
|
+
// yield "endpointses" (ends in s → +es) without the builtin map entry.
|
|
31
|
+
expect(kindToPlural('Endpoints')).toBe('endpoints')
|
|
32
|
+
expect(pluralToKind('endpoints')).toBe('Endpoints')
|
|
33
|
+
})
|
|
34
|
+
|
|
28
35
|
test('handles kinds ending in ss (Class-suffix)', () => {
|
|
29
36
|
expect(kindToPlural('StorageClass')).toBe('storageclasses')
|
|
30
37
|
expect(kindToPlural('IngressClass')).toBe('ingressclasses')
|
package/src/utils/navigation.ts
CHANGED
|
@@ -11,6 +11,7 @@ export type NavigateToResource = (resource: SelectedResource) => void
|
|
|
11
11
|
const BUILTIN_PLURAL_TO_KIND: Record<string, string> = {
|
|
12
12
|
pods: 'Pod',
|
|
13
13
|
services: 'Service',
|
|
14
|
+
endpoints: 'Endpoints', // already-plural resource name; englishPlural would yield "endpointses"
|
|
14
15
|
deployments: 'Deployment',
|
|
15
16
|
daemonsets: 'DaemonSet',
|
|
16
17
|
statefulsets: 'StatefulSet',
|