openwisp-controller icon indicating copy to clipboard operation
openwisp-controller copied to clipboard

[feature] Addition of WHOIS details in Admin and REST API

Open DragnEmperor opened this issue 7 months ago • 1 comments

After closing #1025 , we have to display the fetched details to the user. This includes:

  • Addition of the fetched details in device admin alongside Last IP field.

    Image

  • To include details of WHOIS record in device listing/details endpoint, I plan to create a BriefSerializer for summary and DetailedSerializer for detailed version. We can accept something like detailed=True/False query param in device details endpoint to allow option to switch between summary and detailed version.

    class BriefWHOisSerializer(serializers.ModelSerializer):
           class Meta:
                model=WHOIS
                fields = ["organization_name", "country"]
    
    class DetailedWHOisSerializer(serializers.ModelSerializer):
           class Meta:
                model=WHOIS
                fields = "__all__"
    
  • Test cases to ensure the WHOIS details are correctly displayed in the device admin alongside the Last IP field and properly included in the device list and detail API responses. The tests should cover both summary and detailed views, verifying the functionality of the detailed=True/False query parameter and ensuring correct behavior when WHOIS information is missing or incomplete.

Dependencies

  • [x] https://github.com/openwisp/openwisp-controller/issues/1025

DragnEmperor avatar May 12 '25 14:05 DragnEmperor

Following are the doubts which I think we can discuss before implementing this to have more clarity:

  • Initially we decided on following fields for summary/brief view of WHOIS record: Organization Name and Country Name. If this needs modification please let me know.
  • What fields are we going to show on device admin? What should be kept under additional section?

DragnEmperor avatar May 21 '25 16:05 DragnEmperor