github.com/argoproj/argo-cd/v2@v2.10.9/ui/src/app/applications/components/application-resource-events/application-resource-events.tsx (about)

     1  import {MockupList} from 'argo-ui';
     2  import * as React from 'react';
     3  
     4  import {DataLoader, EventsList} from '../../../shared/components';
     5  import {services} from '../../../shared/services';
     6  
     7  export const ApplicationResourceEvents = (props: {applicationName: string; applicationNamespace: string; resource?: {namespace: string; name: string; uid: string}}) => (
     8      <div className='application-resource-events'>
     9          <DataLoader
    10              load={() =>
    11                  props.resource
    12                      ? services.applications.resourceEvents(props.applicationName, props.applicationNamespace, props.resource)
    13                      : services.applications.events(props.applicationName, props.applicationNamespace)
    14              }
    15              loadingRenderer={() => <MockupList height={50} marginTop={10} />}>
    16              {events => <EventsList events={events} />}
    17          </DataLoader>
    18      </div>
    19  );