aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/issues
diff options
context:
space:
mode:
Diffstat (limited to 'server/sonar-web/src/main/js/apps/issues')
-rw-r--r--server/sonar-web/src/main/js/apps/issues/components/App.js51
-rw-r--r--server/sonar-web/src/main/js/apps/issues/sidebar/CreationDateFacet.js2
2 files changed, 29 insertions, 24 deletions
diff --git a/server/sonar-web/src/main/js/apps/issues/components/App.js b/server/sonar-web/src/main/js/apps/issues/components/App.js
index f6616f229ed..984aedca11c 100644
--- a/server/sonar-web/src/main/js/apps/issues/components/App.js
+++ b/server/sonar-web/src/main/js/apps/issues/components/App.js
@@ -420,7 +420,7 @@ export default class App extends React.PureComponent {
if (this.mounted) {
this.setState({ loading: false });
}
- return Promise.reject();
+ return [];
}
);
}
@@ -518,29 +518,32 @@ export default class App extends React.PureComponent {
};
fetchFacet = (facet /*: string */) => {
- return this.fetchIssues({ ps: 1, facets: mapFacet(facet) }).then(({ facets, ...other }) => {
- if (this.mounted) {
- this.setState(state => ({
- facets: { ...state.facets, ...parseFacets(facets) },
- referencedComponents: {
- ...state.referencedComponents,
- ...keyBy(other.components, 'uuid')
- },
- referencedLanguages: {
- ...state.referencedLanguages,
- ...keyBy(other.languages, 'key')
- },
- referencedRules: {
- ...state.referencedRules,
- ...keyBy(other.rules, 'key')
- },
- referencedUsers: {
- ...state.referencedUsers,
- ...keyBy(other.users, 'login')
- }
- }));
- }
- });
+ return this.fetchIssues({ ps: 1, facets: mapFacet(facet) }).then(
+ ({ facets, ...other }) => {
+ if (this.mounted) {
+ this.setState(state => ({
+ facets: { ...state.facets, ...parseFacets(facets) },
+ referencedComponents: {
+ ...state.referencedComponents,
+ ...keyBy(other.components, 'uuid')
+ },
+ referencedLanguages: {
+ ...state.referencedLanguages,
+ ...keyBy(other.languages, 'key')
+ },
+ referencedRules: {
+ ...state.referencedRules,
+ ...keyBy(other.rules, 'key')
+ },
+ referencedUsers: {
+ ...state.referencedUsers,
+ ...keyBy(other.users, 'login')
+ }
+ }));
+ }
+ },
+ () => {}
+ );
};
isFiltered = () => {
diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/CreationDateFacet.js b/server/sonar-web/src/main/js/apps/issues/sidebar/CreationDateFacet.js
index 461d3405d14..edc61cf799d 100644
--- a/server/sonar-web/src/main/js/apps/issues/sidebar/CreationDateFacet.js
+++ b/server/sonar-web/src/main/js/apps/issues/sidebar/CreationDateFacet.js
@@ -228,6 +228,7 @@ export default class CreationDateFacet extends React.PureComponent {
<DateInput
className="search-navigator-date-facet-selection-dropdown-left"
inputClassName="search-navigator-date-facet-selection-input"
+ maxDate={createdBefore ? toShortNotSoISOString(createdBefore) : '+0'}
onChange={this.handlePeriodChangeAfter}
placeholder={translate('from')}
value={createdAfter ? toShortNotSoISOString(createdAfter) : undefined}
@@ -235,6 +236,7 @@ export default class CreationDateFacet extends React.PureComponent {
<DateInput
className="search-navigator-date-facet-selection-dropdown-right"
inputClassName="search-navigator-date-facet-selection-input"
+ minDate={createdAfter ? toShortNotSoISOString(createdAfter) : undefined}
onChange={this.handlePeriodChangeBefore}
placeholder={translate('to')}
value={createdBefore ? toShortNotSoISOString(createdBefore) : undefined}