github.com/argoproj/argo-cd/v2@v2.10.9/ui/src/app/applications/components/pod-logs-viewer/since-seconds-selector.tsx (about) 1 import * as React from 'react'; 2 import {Tooltip} from 'argo-ui'; 3 4 // SinceSelector is a component that renders a dropdown menu of time ranges 5 export const SinceSecondsSelector = ({sinceSeconds, setSinceSeconds}: {sinceSeconds: number; setSinceSeconds: (value: number) => void}) => ( 6 <Tooltip content='Show logs since a given time'> 7 <select 8 className='argo-field' 9 style={{marginRight: '1em'}} 10 value={sinceSeconds} 11 onChange={e => { 12 const v = parseInt(e.target.value, 10); 13 setSinceSeconds(!isNaN(v) ? v : null); 14 }}> 15 <option value='60'>1m ago</option> 16 <option value='300'>5m ago</option> 17 <option value='600'>10m ago</option> 18 <option value='1800'>30m ago</option> 19 <option value='3600'>1h ago</option> 20 <option value='14400'>4h ago</option> 21 <option>forever</option> 22 </select> 23 </Tooltip> 24 );