Allow to specify KubeObjectDetailRegistration priority (#1335)

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
Jari Kolehmainen authored and GitHub committed 2020-11-12 09:16:22 +02:00
1 parent 1f88c05e82
commit deb4773b44
22 files changed
+201 -36

No files matched your search

@@ -59,8 +59,6 @@ export class RoleDetails extends React.Component<Props> {
</div>
)
})}
<KubeEventDetails object={role}/>
</div>
)
}
@@ -73,6 +71,14 @@ kubeObjectDetailRegistry.add({
Details: (props) => <RoleDetails {...props}/>
}
})
kubeObjectDetailRegistry.add({
kind: "Role",
apiVersions: ["rbac.authorization.k8s.io/v1"],
priority: 5,
components: {
Details: (props) => <KubeEventDetails {...props} />
}
})
kubeObjectDetailRegistry.add({
kind: "ClusterRole",
@@ -81,3 +87,11 @@ kubeObjectDetailRegistry.add({
Details: (props) => <RoleDetails {...props}/>
}
})
kubeObjectDetailRegistry.add({
kind: "ClusterRole",
apiVersions: ["rbac.authorization.k8s.io/v1"],
priority: 5,
components: {
Details: (props) => <KubeEventDetails {...props}/>
}
})