Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[4.0.4-7.10] Fixed filter pinned crash returning from agents #2864

Merged
merged 4 commits into from Jan 29, 2021

Conversation

frankeros
Copy link
Contributor

Hi team, this resolves

  • Blank page on modules after pinning a filter, go agents and return.

Resolves #2801 comment

@frankeros frankeros self-assigned this Jan 28, 2021
Copy link
Contributor

@gabiwassan gabiwassan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@frankeros frankeros changed the title [4.0.4-7.10] Fixed filter pinner crash returning from agents [4.0.4-7.10] Fixed filter pinned crash returning from agents Jan 28, 2021
@frankeros frankeros mentioned this pull request Jan 28, 2021
3 tasks
@Desvelao
Copy link
Member

I tested the PR and the problem seems to continue to occur when the filter is pinned.

The selected tab for the module is set from tabView URL quey parameter. For some reason, the tabView query parameter is not present in the URL when there a filter pinned.

public/components/common/modules/main-overview.tsx

async componentDidMount() {
    const tabView = AppNavigate.getUrlParameter('tabView');
    const tab = AppNavigate.getUrlParameter('tab');
    if(tabView && tabView !== this.props.selectView){
      if(tabView === 'panels' && tab=== 'sca' ){ // SCA initial tab is inventory
        this.props.onSelectedTabChanged('inventory');
      }else{
        this.props.onSelectedTabChanged(tabView);
      }
    }
    
    this.setGlobalBreadcrumb();
  }

Maybe we could set the default tab if tabView URL query param is not present?

Copy link
Member

@Desvelao Desvelao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested the PR after the changes and it is working now. Good job!

@frankeros frankeros merged commit dbb0de9 into 4.0-7.10 Jan 29, 2021
@frankeros frankeros deleted the bugfix/filter-pinner-crash-returning-from-agents branch January 29, 2021 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants