Skip to content
This repository was archived by the owner on May 17, 2021. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 26 additions & 18 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
"mongodb-connection-model": "^14.5.1",
"mongodb-data-service": "^16.5.2",
"mongodb-js-precommit": "^2.2.0",
"mongodb-query-parser": "^2.1.1",
"mongodb-query-parser": "^2.2.0",
"mongodb-reflux-store": "^0.0.1",
"mongodb-schema": "^8.2.5",
"ms": "^2.1.2",
Expand Down Expand Up @@ -159,4 +159,4 @@
"lodash": "^4.17.15",
"mongodb-query-util": "^0.2.1"
}
}
}
10 changes: 8 additions & 2 deletions src/components/query-bar/query-bar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ import QUERY_PROPERTIES from 'constants/query-properties';

import styles from './query-bar.less';

/**
* @type {Record<string, { type: 'document' | 'numeric' | 'boolean', placeholder: string | null, link: string, label?: string }>}
*/
const OPTION_DEFINITION = {
filter: {
type: 'document',
Expand Down Expand Up @@ -51,8 +54,9 @@ const OPTION_DEFINITION = {
link: 'https://docs.mongodb.com/manual/reference/method/cursor.limit/'
},
maxTimeMS: {
label: 'Max Time MS',
type: 'numeric',
placeholder: '5000',
placeholder: '60000',
link: 'https://docs.mongodb.com/manual/reference/method/cursor.maxTimeMS/'
},
sample: {
Expand Down Expand Up @@ -210,9 +214,11 @@ class QueryBar extends Component {
const value = OPTION_DEFINITION[option].type === 'boolean' ?
this.props[option] : this.props[`${option}String`];

const label = OPTION_DEFINITION[option].label || option;

return (
<QueryOption
label={option}
label={label}
autoPopulated={autoPopulated}
serverVersion={this.props.serverVersion}
hasToggle={hasToggle}
Expand Down
2 changes: 1 addition & 1 deletion src/components/query-option/query-option.less
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
}

.is-numeric-type {
flex-basis: 170px;
flex-basis: 185px;
}

.is-boolean-type {
Expand Down
2 changes: 1 addition & 1 deletion src/constants/query-bar-store.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const DEFAULT_SKIP = 0;
const DEFAULT_LIMIT = 0;
const DEFAULT_SAMPLE = false;

const DEFAULT_MAX_TIME_MS = ms('5 seconds');
const DEFAULT_MAX_TIME_MS = ms('1m');
const DEFAULT_SAMPLE_SIZE = 1000;
const DEFAULT_STATE = RESET_STATE;

Expand Down
2 changes: 1 addition & 1 deletion test/renderer/query-changed-store.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ describe('QueryChangedStore [Store]', function() {
expect(state.project).to.be.deep.equal(null);
expect(state.collation).to.be.deep.equal(null);
expect(state.sample).to.be.false;
expect(state.maxTimeMS).to.be.equal(5000);
expect(state.maxTimeMS).to.be.equal(60000);
done();
});

Expand Down