mirror of
				https://github.com/optim-enterprises-bv/OptimCloud-gw-ui.git
				synced 2025-10-31 02:07:45 +00:00 
			
		
		
		
	Disabling download for failed traces
This commit is contained in:
		| @@ -125,7 +125,7 @@ const DeviceCommands = ({ selectedDeviceId }) => { | |||||||
|         const blob = new Blob([response.data], { type: 'application/octet-stream' }) |         const blob = new Blob([response.data], { type: 'application/octet-stream' }) | ||||||
|         const link = document.createElement('a') |         const link = document.createElement('a') | ||||||
|         link.href = window.URL.createObjectURL(blob) |         link.href = window.URL.createObjectURL(blob) | ||||||
|         link.download = 'Report.pdf' |         link.download = `Trace_${uuid}.pcap`; | ||||||
|         link.click() |         link.click() | ||||||
|     }); |     }); | ||||||
|   }  |   }  | ||||||
| @@ -159,7 +159,7 @@ const DeviceCommands = ({ selectedDeviceId }) => { | |||||||
|       setScanDate(item.completed); |       setScanDate(item.completed); | ||||||
|       setShowScanModal(true); |       setShowScanModal(true); | ||||||
|     } |     } | ||||||
|     else if (item.command === 'trace') { |     else if (item.command === 'trace' && item.waitingForFile === 0) { | ||||||
|       downloadTrace(item.UUID); |       downloadTrace(item.UUID); | ||||||
|     } |     } | ||||||
|     else { |     else { | ||||||
| @@ -339,7 +339,7 @@ const DeviceCommands = ({ selectedDeviceId }) => { | |||||||
|                               <CButton |                               <CButton | ||||||
|                                 color="primary" |                                 color="primary" | ||||||
|                                 variant={details.includes(index) ? '' : 'outline'} |                                 variant={details.includes(index) ? '' : 'outline'} | ||||||
|                                 disabled={item.completed === 0} |                                 disabled={item.completed === 0 || (item.command === 'trace' && item.waitingForFile !== 0)} | ||||||
|                                 shape="square" |                                 shape="square" | ||||||
|                                 size="sm" |                                 size="sm" | ||||||
|                                 onClick={() => { |                                 onClick={() => { | ||||||
| @@ -347,8 +347,8 @@ const DeviceCommands = ({ selectedDeviceId }) => { | |||||||
|                                 }} |                                 }} | ||||||
|                               > |                               > | ||||||
|                                 { |                                 { | ||||||
|                                   item.command === 'trace' ? |                                   item.command === 'trace'  ? | ||||||
|                                   <CIcon content={cilCloudDownload}/> |                                   <CIcon content={cilCloudDownload} size="lg"/> | ||||||
|                                   : |                                   : | ||||||
|                                   <FontAwesomeIcon |                                   <FontAwesomeIcon | ||||||
|                                     icon={faClipboardCheck} |                                     icon={faClipboardCheck} | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 bourquecharles
					bourquecharles