github.com/argoproj/argo-cd/v2@v2.10.9/ui/src/app/applications/components/pod-logs-viewer/download-logs-button.tsx (about)

     1  import {services} from '../../../shared/services';
     2  import * as React from 'react';
     3  import {PodLogsProps} from './pod-logs-viewer';
     4  import {Button} from '../../../shared/components/button';
     5  
     6  // DownloadLogsButton is a button that downloads the logs to a file
     7  export const DownloadLogsButton = ({applicationName, applicationNamespace, containerName, group, kind, name, namespace, podName}: PodLogsProps) => (
     8      <Button
     9          title='Download logs to file'
    10          icon='download'
    11          onClick={async () => {
    12              const downloadURL = services.applications.getDownloadLogsURL(applicationName, applicationNamespace, namespace, podName, {group, kind, name}, containerName);
    13              window.open(downloadURL, '_blank');
    14          }}
    15      />
    16  );