-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Alex Collins <[email protected]>
- Loading branch information
Showing
4 changed files
with
32 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 9 additions & 9 deletions
18
ui/src/app/applications/components/pod-logs-viewer/since-seconds-selector.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
import * as React from 'react'; | ||
import {Since} from '../../../shared/services/since'; | ||
import {Tooltip} from 'argo-ui'; | ||
|
||
// SinceSelector is a component that renders a dropdown menu of time ranges | ||
export const SinceSelector = ({since, setSince}: {since: Since; setSince: (value: Since) => void}) => ( | ||
export const SinceSecondsSelector = ({sinceSeconds, setSinceSeconds}: {sinceSeconds: number; setSinceSeconds: (value: number) => void}) => ( | ||
<Tooltip content='Show logs since a given time'> | ||
<select className='argo-field' value={since} onChange={e => setSince(e.target.value as Since)}> | ||
<option value='1m ago'>1m ago</option> | ||
<option value='5m ago'>5m ago</option> | ||
<option value='30m ago'>30m ago</option> | ||
<option value='1h ago'>1h ago</option> | ||
<option value='4h ago'>4h ago</option> | ||
<option value='forever'>forever</option> | ||
<select className='argo-field' style={{marginRight: '1em'}} value={sinceSeconds} onChange={e => setSinceSeconds(parseInt(e.target.value, 10))}> | ||
<option value='60'>1m ago</option> | ||
<option value='300'>5m ago</option> | ||
<option value='600'>10m ago</option> | ||
<option value='1800'>30m ago</option> | ||
<option value='3600'>1h ago</option> | ||
<option value='14400'>4h ago</option> | ||
<option>forever</option> | ||
</select> | ||
</Tooltip> | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters