Skip to content

Commit

Permalink
Configure search.maxLimit
Browse files Browse the repository at this point in the history
Signed-off-by: Gabriel Fernando Dyck <gabrielfernandodyck@gmail.com>
  • Loading branch information
GabrielDyck committed Jan 14, 2020
1 parent 537bbe2 commit f1b1d06
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import * as jaegerApiActions from '../../actions/jaeger-api';
import { formatDate, formatTime } from '../../utils/date';
import reduxFormFieldAdapter from '../../utils/redux-form-field-adapter';
import { DEFAULT_OPERATION, DEFAULT_LIMIT, DEFAULT_LOOKBACK } from '../../constants/search-form';

import getConfigValue from '../../utils/config/get-config';
import './SearchForm.css';

const FormItem = Form.Item;
Expand Down Expand Up @@ -443,7 +443,7 @@ export class SearchFormImpl extends React.PureComponent {
type="number"
component={AdaptedInput}
placeholder="Limit Results"
props={{ disabled, min: 1, max: 1500 }}
props={{ disabled, min: 1, max: getConfigValue('search.maxLimit') }}
/>
</FormItem>

Expand Down
1 change: 1 addition & 0 deletions packages/jaeger-ui/src/constants/default-config.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ export default deepFreeze(
label: '2 Days',
value: '2d',
},
maxLimit: 1500,
},
tracking: {
gaID: null,
Expand Down
2 changes: 1 addition & 1 deletion packages/jaeger-ui/src/types/config.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export type Config = {
deepDependencies?: { menuEnabled?: boolean };
dependencies?: { dagMaxServicesLen?: number; menuEnabled?: boolean };
menu: (ConfigMenuGroup | ConfigMenuItem)[];
search?: { maxLookback: { label: string; value: string } };
search?: { maxLookback: { label: string; value: string }; maxLimit: number };
scripts?: TScript[];
topTagPrefixes?: string[];
tracking?: {
Expand Down

0 comments on commit f1b1d06

Please sign in to comment.