-
-
Notifications
You must be signed in to change notification settings - Fork 247
[gsoc 25] WHOIS Information and IP Address-Based Geolocation #1175
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
Open
DragnEmperor
wants to merge
8
commits into
master
Choose a base branch
from
gsoc25-whois
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+4,019
−25
Open
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
4347efe
[feature] Base logic for WHOIS lookup feature #1032 #1033 #1037 #1045
DragnEmperor c069378
[feature] Added WHOIS details to the UI #1026
DragnEmperor d5ea50c
[feature] Allow estimating geographic location based on WHOIS data #1034
DragnEmperor 9fd2bb1
[feature] Updating stale WHOIS records #1058
DragnEmperor 160e178
Merge branch 'master' into gsoc25-whois
nemesifier bfe2b15
[qa] Update requirements.txt
nemesifier 7b54fa5
[fix] Fixed clear_last_ip command to call model's save method
pandafy 6bddb0b
[qa] Fixed qa errors
pandafy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,87 @@ | ||
| Estimated Location | ||
| ================== | ||
|
|
||
| .. important:: | ||
|
|
||
| The **Estimated Location** feature is **disabled by default**. | ||
|
|
||
| Before enabling it, the :doc:`WHOIS Lookup feature <whois>` must be | ||
| enabled. Then set | ||
| :ref:`OPENWISP_CONTROLLER_ESTIMATED_LOCATION_ENABLED` to ``True`` | ||
|
|
||
| .. contents:: **Table of contents**: | ||
| :depth: 1 | ||
| :local: | ||
|
|
||
| Overview | ||
| -------- | ||
|
|
||
| This feature automatically creates or updates a device’s location based on | ||
| latitude and longitude information retrieved from the WHOIS Lookup | ||
| feature. | ||
|
|
||
| Trigger Conditions | ||
| ------------------ | ||
|
|
||
| This feature is triggered when: | ||
|
|
||
| - A **fresh WHOIS lookup** is performed for a device. | ||
| - Or when a WHOIS record already exists for the device’s IP **and**: | ||
|
|
||
| - The device’s last IP address is **public**. | ||
| - WHOIS lookup and Estimated Location is **enabled** for the device’s | ||
| organization. | ||
|
|
||
| Behavior | ||
| -------- | ||
|
|
||
| The system will **attach the already existing matching location** of | ||
| another device with same ip to the current device if: | ||
|
|
||
| - Only one device is found with that IP and it has a location. | ||
| - The current device **has no location** or that location is | ||
| **estimated**. | ||
|
|
||
| If there are multiple devices with location for the same IP, the system | ||
| will **not attach any location** to the current device and a notification | ||
| will be sent suggesting the user to manually assign/create a location for | ||
| the device. | ||
|
|
||
| If there is **no matching location**, a new estimated location is created | ||
| or the existing one is updated using coordinates from the WHOIS record, | ||
| but only if the existing location is estimated. | ||
|
|
||
| If two devices share the same IP address and are assigned to the same | ||
| location, and the last IP of one of the devices is updated, the system | ||
| will create a new estimated location for that device. | ||
|
|
||
| Visibility of Estimated Status | ||
| ------------------------------ | ||
|
|
||
| The estimated status of a location is visible on the location page if the | ||
| feature is enabled for the organization. The location admin page also | ||
| includes indicators for the estimated status. | ||
|
|
||
| - The name of the location will have suffix **(Estimated Location : | ||
| <ip_address>)**. | ||
| - A warning on top of the page. | ||
| - **Is Estimated** field. | ||
|
|
||
| Changes to the ``coordinates`` and ``geometry`` of the estimated location | ||
| will set the ``is_estimated`` field to ``False`` and remove the | ||
| "(Estimated Location)" suffix with IP from the location name. | ||
|
|
||
| In REST API, the field will be visible in the :ref:`Device Location | ||
| <device_location_estimated>`, :ref:`Location list | ||
| <location_list_estimated>`, :ref:`Location Detail | ||
| <location_detail_estimated>` and :ref:`Location list (GeoJson) | ||
| <location_geojson_estimated>` if the feature is **enabled**. The field can | ||
| also be used for filtering in the location list (including geojson) | ||
| endpoints and in the :ref:`Device List <device_list_estimated_filters>`. | ||
|
|
||
| Managing Older Estimated Locations | ||
| ---------------------------------- | ||
|
|
||
| Whenever location related fields in WHOIS records are updated as per | ||
| :ref:`Managing WHOIS Older Records <whois_older_records>`; the location | ||
| will also be updated automatically. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is outdated, we changed this to
OPENWISP_CONTROLLER_ESTIMATED_LOCATION_ENABLED