Skip to content

Commit

Permalink
Setting default refresh value for task view as none.
Browse files Browse the repository at this point in the history
As part of this we added a default parameter that can be passed for refresh widget to avoid every refresh widget getting affected.
  • Loading branch information
lokesh-lingarajan committed Mar 18, 2022
1 parent 0b26da1 commit 99b7f38
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions web-console/src/components/refresh-button/refresh-button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,15 @@ const DELAYS: DelayLabel[] = [
export interface RefreshButtonProps {
onRefresh: (auto: boolean) => void;
localStorageKey?: LocalStorageKeys;
defaultDelay?: number;
}

export const RefreshButton = React.memo(function RefreshButton(props: RefreshButtonProps) {
const { onRefresh, localStorageKey } = props;
const { onRefresh, localStorageKey, defaultDelay = 30000 } = props;

return (
<TimedButton
defaultDelay={30000}
defaultDelay={defaultDelay}
label="Auto refresh every"
delays={DELAYS}
icon={IconNames.REFRESH}
Expand Down
1 change: 1 addition & 0 deletions web-console/src/views/ingestion-view/ingestion-view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1136,6 +1136,7 @@ ORDER BY "rank" DESC, "created_time" DESC`;
</ButtonGroup>
<RefreshButton
localStorageKey={LocalStorageKeys.TASKS_REFRESH_RATE}
defaultDelay={0}
onRefresh={auto => this.taskQueryManager.rerunLastQuery(auto)}
/>
{this.renderBulkTasksActions()}
Expand Down

0 comments on commit 99b7f38

Please sign in to comment.