File tree Expand file tree Collapse file tree 5 files changed +48
-1
lines changed Expand file tree Collapse file tree 5 files changed +48
-1
lines changed Original file line number Diff line number Diff line change 1
1
import * as React from 'react' ;
2
2
import { SVGIconProps } from '@patternfly/react-icons/dist/esm/createIcon' ;
3
3
import { ProjectObjectType , typedColor } from '~/components/design/utils' ;
4
- import { RegisteredModelIcon } from '~/images/icons' ;
4
+ import { GroupIcon , RegisteredModelIcon , UserIcon } from '~/images/icons' ;
5
5
6
6
type TypedObjectIconProps = SVGIconProps & {
7
7
resourceType : ProjectObjectType ;
@@ -21,6 +21,12 @@ const TypedObjectIcon: React.FC<TypedObjectIconProps> = ({
21
21
case ProjectObjectType . modelRegistrySettings :
22
22
Icon = RegisteredModelIcon ;
23
23
break ;
24
+ case ProjectObjectType . user :
25
+ Icon = UserIcon ;
26
+ break ;
27
+ case ProjectObjectType . group :
28
+ Icon = GroupIcon ;
29
+ break ;
24
30
default :
25
31
return null ;
26
32
}
Original file line number Diff line number Diff line change @@ -63,6 +63,13 @@ export declare type K8sResourceIdentifier = {
63
63
kind : string ;
64
64
} ;
65
65
66
+ export declare type K8sStatus = K8sResourceIdentifier & {
67
+ code : number ;
68
+ message : string ;
69
+ reason : string ;
70
+ status : 'Success' | 'Failure' ;
71
+ } ;
72
+
66
73
export declare type K8sResourceCommon = K8sResourceIdentifier &
67
74
Partial < {
68
75
metadata : Partial < {
Original file line number Diff line number Diff line change @@ -265,3 +265,31 @@ export type ServiceKind = K8sResourceCommon & {
265
265
} [ ] ;
266
266
} ;
267
267
} ;
268
+
269
+ export type RoleBindingSubject = {
270
+ kind : string ;
271
+ apiGroup ?: string ;
272
+ name : string ;
273
+ } ;
274
+
275
+ export type RoleBindingRoleRef = {
276
+ kind : 'Role' | 'ClusterRole' ;
277
+ apiGroup ?: string ;
278
+ name : string ;
279
+ } ;
280
+
281
+ export type RoleBindingKind = K8sResourceCommon & {
282
+ metadata : {
283
+ name : string ;
284
+ namespace : string ;
285
+ } ;
286
+ subjects : RoleBindingSubject [ ] ;
287
+ roleRef : RoleBindingRoleRef ;
288
+ } ;
289
+
290
+ export type GroupKind = K8sResourceCommon & {
291
+ metadata : {
292
+ name : string ;
293
+ } ;
294
+ users : string [ ] ;
295
+ } ;
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ export * from './appUtils';
3
3
export * from './const' ;
4
4
export * from './markdown' ;
5
5
export * from './time' ;
6
+ export * from './string' ;
6
7
export * from './useDebounceCallback' ;
7
8
export * from './useDeepCompareMemoize' ;
8
9
export * from './useEventListener' ;
Original file line number Diff line number Diff line change
1
+ export const genRandomChars = ( len = 6 ) : string =>
2
+ Math . random ( )
3
+ . toString ( 36 )
4
+ . replace ( / [ ^ a - z 0 - 9 ] + / g, '' )
5
+ . substr ( 1 , len ) ;
You can’t perform that action at this time.
0 commit comments