[feature] Addition of WHOIS details in Admin and REST API
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 IPfield. -
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/Falsequery 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
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 NameandCountry 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?