diff --git a/USERS.md b/USERS.md index 6952b1d359b73..7c398e58b4125 100644 --- a/USERS.md +++ b/USERS.md @@ -35,6 +35,7 @@ Currently, the following organizations are **officially** using Argo CD: 1. [BCDevExchange DevOps Platform](https://bcdevexchange.org/DevOpsPlatform) 1. [Beat](https://thebeat.co/en/) 1. [Beez Innovation Labs](https://www.beezlabs.com/) +1. [Bedag Informatik AG](https://www.bedag.ch/) 1. [Beleza Na Web](https://www.belezanaweb.com.br/) 1. [BigPanda](https://bigpanda.io) 1. [BioBox Analytics](https://biobox.io) diff --git a/ui/src/app/applications/components/application-details/application-resource-list.tsx b/ui/src/app/applications/components/application-details/application-resource-list.tsx index d1e01adb52c04..6cee8b04a7205 100644 --- a/ui/src/app/applications/components/application-details/application-resource-list.tsx +++ b/ui/src/app/applications/components/application-details/application-resource-list.tsx @@ -12,17 +12,14 @@ import {format} from 'date-fns'; import {ResourceNode, ResourceRef} from '../../../shared/models'; import './application-resource-list.scss'; -export const ApplicationResourceList = ({ - resources, - onNodeClick, - nodeMenu, - tree -}: { +export interface ApplicationResourceListProps { resources: models.ResourceStatus[]; onNodeClick?: (fullName: string) => any; nodeMenu?: (node: models.ResourceNode) => React.ReactNode; tree?: models.ApplicationTree; -}) => { +} + +export const ApplicationResourceList = (props: ApplicationResourceListProps) => { function getResNode(nodes: ResourceNode[], nodeId: string): models.ResourceNode { for (const node of nodes) { if (nodeKey(node) === nodeId) { @@ -31,7 +28,7 @@ export const ApplicationResourceList = ({ } return null; } - const parentNode = ((resources || []).length > 0 && (getResNode(tree.nodes, nodeKey(resources[0])) as ResourceNode)?.parentRefs?.[0]) || ({} as ResourceRef); + const parentNode = ((props.resources || []).length > 0 && (getResNode(props.tree.nodes, nodeKey(props.resources[0])) as ResourceNode)?.parentRefs?.[0]) || ({} as ResourceRef); const searchParams = new URLSearchParams(window.location.search); const view = searchParams.get('view'); @@ -73,7 +70,7 @@ export const ApplicationResourceList = ({
STATUS
- {resources + {props.resources .sort((first, second) => -createdOrNodeKey(first).localeCompare(createdOrNodeKey(second))) .map(res => (
onNodeClick(nodeKey(res))}> + onClick={() => props.onNodeClick && props.onNodeClick(nodeKey(res))}>
@@ -111,7 +108,7 @@ export const ApplicationResourceList = ({
{res.syncWave || '-'}
{res.namespace}
{res.kind === 'ReplicaSet' && - ((getResNode(tree.nodes, nodeKey(res)) as ResourceNode).info || []) + ((getResNode(props.tree.nodes, nodeKey(res)) as ResourceNode).info || []) .filter(tag => !tag.name.includes('Node')) .slice(0, 4) .map((tag, i) => { @@ -140,27 +137,31 @@ export const ApplicationResourceList = ({ )} {res.status && } {res.hook && } -
- ( - - )}> - {nodeMenu({ - name: res.name, - version: res.version, - kind: res.kind, - namespace: res.namespace, - group: res.group, - info: null, - uid: '', - resourceVersion: null, - parentRefs: [] - })} - -
+ {props.nodeMenu && ( +
+ ( + + )}> + {() => + props.nodeMenu({ + name: res.name, + version: res.version, + kind: res.kind, + namespace: res.namespace, + group: res.group, + info: null, + uid: '', + resourceVersion: null, + parentRefs: [] + }) + } + +
+ )}