[GH-ISSUE #7] Bug: Unnecessary call against function on load of each page #4

Closed
opened 2026-03-02 12:03:03 +03:00 by kerem · 2 comments
Owner

Originally created by @gavsto on GitHub (Oct 14, 2021).
Original GitHub issue: https://github.com/KelvinTegelaar/CIPP/issues/7

Describe the bug
When a page with a data table is loaded, before a tenant is selected, the page calls the Azure Function unnecessarily. This slows down the load of the page and can cause a temporary micro hang, triggers the functions with error output and causes unnecessary usage of resource (potentially increasing cost unnecessarily in a consumption plan)

To Reproduce
Steps to reproduce the behavior:

  1. In the function app, go in to the ListSites function and Code + Test
  2. Click on Logs to expand and stream logs live for the function, connecting you to the log streaming service
  3. In a different window, navigate to Sharepoint > List Sharepoint
  4. Note the error that displays in the log stream as the function has been called unnecessarily and without tenant information

Expected behavior
No call to the function should be made until a tenant is selected

Desktop (please complete the following information):

  • OS: Windows 11
  • Browser: Edge
  • Version: v.latest
Originally created by @gavsto on GitHub (Oct 14, 2021). Original GitHub issue: https://github.com/KelvinTegelaar/CIPP/issues/7 **Describe the bug** When a page with a data table is loaded, before a tenant is selected, the page calls the Azure Function unnecessarily. This slows down the load of the page and can cause a temporary micro hang, triggers the functions with error output and causes unnecessary usage of resource (potentially increasing cost unnecessarily in a consumption plan) **To Reproduce** Steps to reproduce the behavior: 1. In the function app, go in to the ListSites function and Code + Test 2. Click on Logs to expand and stream logs live for the function, connecting you to the log streaming service 3. In a different window, navigate to Sharepoint > List Sharepoint 4. Note the error that displays in the log stream as the function has been called unnecessarily and without tenant information **Expected behavior** No call to the function should be made until a tenant is selected **Desktop (please complete the following information):** - OS: Windows 11 - Browser: Edge - Version: v.latest
kerem 2026-03-02 12:03:03 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@KelvinTegelaar commented on GitHub (Oct 15, 2021):

Partly fixed by using an async call, which removes the micro-hang, but the actual fix is removing the unrequired query in the datatables files.

<!-- gh-comment-id:944052413 --> @KelvinTegelaar commented on GitHub (Oct 15, 2021): Partly fixed by using an async call, which removes the micro-hang, but the actual fix is removing the unrequired query in the datatables files.
Author
Owner

@redanthrax commented on GitHub (Oct 18, 2021):

fixing

<!-- gh-comment-id:945928101 --> @redanthrax commented on GitHub (Oct 18, 2021): fixing
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/CIPP#4
No description provided.