This is intended as an asset management dashboard, with a location-centric focus. When a computer signs onto any network and obtains an IP address, the public IP address is obtained, a geolocation calculated, and stored along with other machine information in a database.
![](https://private-user-images.githubusercontent.com/955269/240486242-08744bb9-74cb-40ab-8ff8-e1e51fdd60d8.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzMDg2NzEsIm5iZiI6MTczOTMwODM3MSwicGF0aCI6Ii85NTUyNjkvMjQwNDg2MjQyLTA4NzQ0YmI5LTc0Y2ItNDBhYi04ZmY4LWUxZTUxZmRkNjBkOC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjExJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxMVQyMTEyNTFaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT05NTZhYTlhMGJiMWI1NjlkY2JmMTdhZDU4MmFjMjZlMDRiNzgxZDcyZDFkYmQ2ZWMwZTk3NjczZTAwODlmZmQ2JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.ZHgJpDowkNi7oCWaNGp6fZOnm3GmiFcwSa16VSW-9bk)
- The script is written in Powershell, this does the heavy lifting.
- A Scheduled task will run the script when a network change is detected on the host.
- The script is being deployed on host machines using the existing PW_Logon scripts--specifically the per-office scripts that map network drives.
- An accompanying bash script ('installTask.bat) copies the necessary files to local folder 'C:\Temp\PWITW' and installs a scheduled task (an accompanying 'SubmitPCInfo.xml' file).
- When a network change is detected, the local copy of the PS script is run. A copy of the information (formatted in JSON) is saved in the same folder before sending to the database. PCInfo.json.
- The application repository is stored on github.com.
clone https://github.com/tdotholla/pwitw
- The codebase is written primarily in Javascript/JSX (React) and Node.js with multiple useful NPM packages.
- A node.js server can build and serve website using Yarn/NPM to install necessary packages. T
yarn | yarn start
- A DC Server is currently hosting the application: 'WDCWK1700:3000'
- The database is hosted on restdb.io
- The IP Geolocation API uses ipstack.io (it was ipinfo.io but ran into rate limits)
- The Maps API is Google Maps (would like to use Mapbox in future)
- A Map of Markers, grouped into clusters of two types:
- LAN Clusters: Those workstations whose local IPs are within the PW Subnet of 10.[100-254].X.X
- WAN Clusters: Those workstations whose local IPs are outside of the above scope, and known public subnets. (192.168.X.X, 10.10.X.X, etc.)
- A Section of charts:
- Network Graph - [Inner Pie] Percentage of devices within LAN. [Outer Pie] Counts grouped by network activity.
- Build Graph - Count of devices on each build version.
- A Table: Searchable pivot table
- Fuzzy search using any text (computer name, build, application, etc...)
- Sort by clicking the header of any column.
- Download the filtered results as CSV file with the "Download" button.
- Hide/Show columns with the "Columns" Button.
- Uptime Graph - Counts grouped by uptime duration. (undeveloped)
- At this time, to preserve database size, we only want the last known location instead of a set of locations over time (can form a story of when/where a machine has been).
- Information is pulled once per minute, so as not to go over rate limits.
- We do not store usernames for GDPR Compliance.
- Written in Powershell; for the windows environment.