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

Agents table unnecessary heavy load requests #3686

Merged

Conversation

yenienserrano
Copy link
Member

@yenienserrano yenienserrano commented Nov 16, 2021

Description

  • Change of request for one that does not return data that is not necessary to optimize times
  • Remove limit: 500 as it is the default if no parameters are set

Issue

agents-table.js unnecessary heavy load requests #3621
Closes #3617

Check List

  • Change of request
async UNSAFE_componentWillMount() {
      const managerVersion = await WzRequest.apiReq('GET', '//', {});
      const totalAgent = await WzRequest.apiReq('GET', '/agents', {});
      const agentActive = await WzRequest.apiReq('GET', '/agents/summary/status', {});

      
      this.setState({
        managerVersion: managerVersion.data.data.api_version,
        avaibleAgents: totalAgent.data.data.affected_items,
        agentActive: agentActive.data.data.active + agentActive.data.data.disconnected,
      });
    }

@yenienserrano yenienserrano linked an issue Nov 16, 2021 that may be closed by this pull request
@github-actions
Copy link
Contributor

Jest Test Coverage % values
Statements 3.98% ( 1443 / 36286 )
Branches 1.6% ( 453 / 28324 )
Functions 2.92% ( 259 / 8881 )
Lines 4.03% ( 1398 / 34674 )

@yenienserrano yenienserrano self-assigned this Nov 17, 2021
Copy link
Contributor

@eze9252 eze9252 left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Member

@AlexRuiz7 AlexRuiz7 left a comment

Choose a reason for hiding this comment

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

LGTM!

@MauGaP MauGaP changed the base branch from 4.3-7.10 to 4.3-7.10---RC1 November 30, 2021 14:00
@MauGaP MauGaP merged commit e37c496 into 4.3-7.10---RC1 Nov 30, 2021
@MauGaP MauGaP deleted the feat/3621-agents-table-unnecessary-heavy-load-requests branch November 30, 2021 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Bug issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

agents-table.js unnecessary heavy load requests
4 participants