diff options
Diffstat (limited to 'server/sonar-web/src/main/js/apps/issues/components/App.tsx')
-rw-r--r-- | server/sonar-web/src/main/js/apps/issues/components/App.tsx | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/server/sonar-web/src/main/js/apps/issues/components/App.tsx b/server/sonar-web/src/main/js/apps/issues/components/App.tsx index 8e32c0e0691..355614151ee 100644 --- a/server/sonar-web/src/main/js/apps/issues/components/App.tsx +++ b/server/sonar-web/src/main/js/apps/issues/components/App.tsx @@ -126,7 +126,8 @@ export interface State { openPopup?: { issue: string; name: string }; paging?: Paging; query: Query; - referencedComponents: { [componentKey: string]: ReferencedComponent }; + referencedComponentsById: { [id: string]: ReferencedComponent }; + referencedComponentsByKey: { [key: string]: ReferencedComponent }; referencedLanguages: { [languageKey: string]: ReferencedLanguage }; referencedRules: { [ruleKey: string]: ReferencedRule }; referencedUsers: { [login: string]: ReferencedUser }; @@ -157,7 +158,8 @@ export default class App extends React.PureComponent<Props, State> { myIssues: props.myIssues || areMyIssuesSelected(props.location.query), openFacets: { severities: true, types: true }, query: parseQuery(props.location.query), - referencedComponents: {}, + referencedComponentsById: {}, + referencedComponentsByKey: {}, referencedLanguages: {}, referencedRules: {}, referencedUsers: {}, @@ -477,7 +479,8 @@ export default class App extends React.PureComponent<Props, State> { issues, openIssue, paging, - referencedComponents: keyBy(other.components, 'uuid'), + referencedComponentsById: keyBy(other.components, 'uuid'), + referencedComponentsByKey: keyBy(other.components, 'key'), referencedLanguages: keyBy(other.languages, 'key'), referencedRules: keyBy(other.rules, 'key'), referencedUsers: keyBy(other.users, 'login'), @@ -602,10 +605,14 @@ export default class App extends React.PureComponent<Props, State> { this.setState(state => ({ facets: { ...state.facets, ...parseFacets(facets) }, loadingFacets: omit(state.loadingFacets, facet), - referencedComponents: { - ...state.referencedComponents, + referencedComponentsById: { + ...state.referencedComponentsById, ...keyBy(other.components, 'uuid') }, + referencedComponentsByKey: { + ...state.referencedComponentsByKey, + ...keyBy(other.components, 'key') + }, referencedLanguages: { ...state.referencedLanguages, ...keyBy(other.languages, 'key') @@ -945,7 +952,8 @@ export default class App extends React.PureComponent<Props, State> { openFacets={this.state.openFacets} organization={this.props.organization} query={query} - referencedComponents={this.state.referencedComponents} + referencedComponentsById={this.state.referencedComponentsById} + referencedComponentsByKey={this.state.referencedComponentsByKey} referencedLanguages={this.state.referencedLanguages} referencedRules={this.state.referencedRules} referencedUsers={this.state.referencedUsers} |