diff options
Diffstat (limited to 'server/sonar-web/src/main/js/apps/issues/sidebar/Sidebar.tsx')
-rw-r--r-- | server/sonar-web/src/main/js/apps/issues/sidebar/Sidebar.tsx | 37 |
1 files changed, 8 insertions, 29 deletions
diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/Sidebar.tsx b/server/sonar-web/src/main/js/apps/issues/sidebar/Sidebar.tsx index 8f25db0785b..90460b7b8aa 100644 --- a/server/sonar-web/src/main/js/apps/issues/sidebar/Sidebar.tsx +++ b/server/sonar-web/src/main/js/apps/issues/sidebar/Sidebar.tsx @@ -30,8 +30,6 @@ import { } from '../../../types/component'; import { Facet, - IssueCharacteristic, - IssueCharacteristicFitFor, ReferencedComponent, ReferencedLanguage, ReferencedRule, @@ -39,10 +37,9 @@ import { import { GlobalSettingKeys } from '../../../types/settings'; import { Component, Dict } from '../../../types/types'; import { UserBase } from '../../../types/users'; -import { OpenFacets, Query } from '../utils'; +import { Query } from '../utils'; import AssigneeFacet from './AssigneeFacet'; import AuthorFacet from './AuthorFacet'; -import CharacteristicFacet from './CharacteristicFacet'; import CreationDateFacet from './CreationDateFacet'; import DirectoryFacet from './DirectoryFacet'; import FileFacet from './FileFacet'; @@ -63,13 +60,13 @@ export interface Props { branchLike?: BranchLike; component: Component | undefined; createdAfterIncludesTime: boolean; - facets: Dict<Facet>; + facets: Dict<Facet | undefined>; loadSearchResultCount: (property: string, changes: Partial<Query>) => Promise<Facet>; loadingFacets: Dict<boolean>; myIssues: boolean; onFacetToggle: (property: string) => void; onFilterChange: (changes: Partial<Query>) => void; - openFacets: OpenFacets; + openFacets: Dict<boolean>; query: Query; referencedComponentsById: Dict<ReferencedComponent>; referencedComponentsByKey: Dict<ReferencedComponent>; @@ -150,23 +147,13 @@ export class Sidebar extends React.PureComponent<Props> { newCodeSelected={query.inNewCodePeriod} /> )} - <CharacteristicFacet - fetching={this.props.loadingFacets.characteristics === true} - onChange={this.props.onFilterChange} - onToggle={this.props.onFacetToggle} - open={openFacets.characteristics?.[IssueCharacteristicFitFor.Production]} - stats={facets.characteristics} - fitFor={IssueCharacteristicFitFor.Production} - characteristics={query.characteristics as IssueCharacteristic[]} - /> - <CharacteristicFacet - fetching={this.props.loadingFacets.characteristics === true} + <TypeFacet + fetching={this.props.loadingFacets.types === true} onChange={this.props.onFilterChange} onToggle={this.props.onFacetToggle} - open={openFacets.characteristics?.[IssueCharacteristicFitFor.Development]} - stats={facets.characteristics} - fitFor={IssueCharacteristicFitFor.Development} - characteristics={query.characteristics as IssueCharacteristic[]} + open={!!openFacets.types} + stats={facets.types} + types={query.types} /> <SeverityFacet fetching={this.props.loadingFacets.severities === true} @@ -176,14 +163,6 @@ export class Sidebar extends React.PureComponent<Props> { severities={query.severities} stats={facets.severities} /> - <TypeFacet - fetching={this.props.loadingFacets.types === true} - onChange={this.props.onFilterChange} - onToggle={this.props.onFacetToggle} - open={!!openFacets.types} - stats={facets.types} - types={query.types} - /> <ScopeFacet fetching={this.props.loadingFacets.scopes === true} onChange={this.props.onFilterChange} |