github.com/argoproj/argo-cd@v1.8.7/ui/src/app/applications/components/application-deployment-history/revision-metadata-rows.tsx (about)

     1  import {DataLoader} from 'argo-ui';
     2  import * as React from 'react';
     3  import {Timestamp} from '../../../shared/components/timestamp';
     4  import {ApplicationSource, RevisionMetadata} from '../../../shared/models';
     5  import {services} from '../../../shared/services';
     6  
     7  export const RevisionMetadataRows = (props: {applicationName: string; source: ApplicationSource}) => {
     8      if (props.source.chart) {
     9          return (
    10              <div>
    11                  <div className='row'>
    12                      <div className='columns small-3'>Helm Chart </div>
    13                      <div className='columns small-9'>{props.source.chart}</div>
    14                  </div>
    15                  <div className='row'>
    16                      <div className='columns small-3'>Version</div>
    17                      <div className='columns small-9'>v{props.source.targetRevision}</div>
    18                  </div>
    19              </div>
    20          );
    21      }
    22      return (
    23          <DataLoader input={props} load={input => services.applications.revisionMetadata(input.applicationName, input.source.targetRevision)}>
    24              {(m: RevisionMetadata) => (
    25                  <div>
    26                      <div className='row'>
    27                          <div className='columns small-3'>Authored by</div>
    28                          <div className='columns small-9'>
    29                              {m.author || 'unknown'}
    30                              <br />
    31                              {m.date && <Timestamp date={m.date} />}
    32                          </div>
    33                      </div>
    34                      {m.tags && (
    35                          <div className='row'>
    36                              <div className='columns small-3'>Tagged</div>
    37                              <div className='columns small-9'>{m.tags.join(', ')}</div>
    38                          </div>
    39                      )}
    40                      {m.message && (
    41                          <div className='row'>
    42                              <div className='columns small-3' />
    43                              <div className='columns small-9'>{m.message}</div>
    44                          </div>
    45                      )}
    46                      <div className='row'>
    47                          <div className='columns small-3'>GPG signature</div>
    48                          <div className='columns small-9'>{m.signatureInfo || '-'}</div>
    49                      </div>
    50                  </div>
    51              )}
    52          </DataLoader>
    53      );
    54  };