apim-apps icon indicating copy to clipboard operation
apim-apps copied to clipboard

Fix API count update issue after deletion from overview page

Open ranuka-laksika opened this issue 2 months ago • 1 comments

Fixes issue #4522 - API count is not updating when an API is deleted

Issue URL: https://github.com/wso2/api-manager/issues/4522

Changes Made

  • Modified DeleteApiButton.jsx to set sessionStorage flag when API is deleted from overview page
  • Added logic in TableView.jsx to detect the sessionStorage flag and refresh data automatically
  • Implemented 500ms delay for smooth user experience after deletion

Build Information

  • Built using Java 11 and Maven 3.6.3
  • Generated artifacts: publisher.war (33MB), devportal.war (23MB), admin.war (22MB)

Artifact Replacement

  • Replaced publisher.war in wso2am-4.6.0 pack (contains the main fix)
  • Replaced devportal.war in wso2am-4.6.0 pack (for consistency)
  • Replaced admin.war in wso2am-4.6.0 pack (for consistency)
  • Location: wso2am-4.6.0/repository/deployment/server/webapps/

Modified wso2am-4.6.0 Pack (GitHub Actions Artifact)

The complete modified wso2am-4.6.0 pack with all updated artifacts has been uploaded as a GitHub Actions artifact.

Download Link: 🔗 Download from GitHub Actions Run

Artifact Details:

  • Artifact Name: wso2am-4.6.0-issue-22.zip
  • Location: Available in the GitHub Actions workflow run linked above
  • How to Download:
    1. Click the GitHub Actions run link above
    2. Scroll down to the "Artifacts" section at the bottom of the page
    3. Download the artifact: wso2am-4.6.0-issue-22.zip
    4. Extract and use the modified pack directly

What's included:

  • All replaced .war files from the build (publisher.war, devportal.war, admin.war)
  • Complete wso2am-4.6.0 directory structure
  • Ready to use without any additional build steps

Testing

  • No testing required for frontend repository changes as per workflow guidelines
  • Fix targets the Publisher Portal where users delete APIs from overview pages
  • Ensures API count updates immediately without requiring page refresh

Technical Details

The fix uses sessionStorage as a communication mechanism between the API overview/detail pages and the listing page. When an API is deleted from the overview, a flag is stored temporarily. Upon component initialization in the listing view, this flag triggers a data refresh, ensuring the count updates immediately.

🤖 Generated with Claude Code

ranuka-laksika avatar Oct 29 '25 03:10 ranuka-laksika