This is a sveltekit web application, with a server written in Go and Python microservices.
This was given to me by VigilantIoE as an assessment to complete.
Below are the objectives given, and the status of each one. There were a few technical issues code wise, and I have fixed all that I had seen that were relative to given objectives.
As a quick aside, I did have a bit of an issue understanding the API values, with some returning 0 (host being up given the unit test), some returning greater than 1, (which I can only assume meaning offline given the information, but an API spec would help clear this information), and others returnning null values. Null may mean unknown, which in that case I would need to add another label / dataset to each chart.
All timestamps are recorded onto the line chart, left out timestamps but if more time was allotted I would have most certainly added annotations to the chart for each individual plot.
[X] Add a few visualizations of the data returned from the API.
[X] Utilize the "microservices" directory to assist with some data visualizations. We've included tests for one such visualization, a simple panel that displays, based on the data provided, if the host is "UP" or "DOWN". Please make all of these pass, and feel free to add new ones for any others you want to add.
[x] Add the ability to resize the charts, and have the new size persist when the page is refreshed.
[X] Create a treeview component with host we provided, and add a few made-up hosts that would return a similar dashboard (but keep in mind our API only returns data for the one host)
[X] Please add your own eye and style this page as you'd like!
NodeJS / NPM required (using LTS currently, v18+ required).
Go required for backend / API
Python required if unit tests are being ran.
To run this application, you will first need to install the requirements listed above.
I have tested this app in Windows, utilizing WSL, and have not used in Linux strictly as of yet but there should be close to no issues.
After ensuring requirements are installed, all that is required is to run npm install && npm run dev
which will then start the web application. Next, you will need to run the go backend, by simply running go run .\server\main.go
. You can run these both within screens to monitor, or separate terminals if you desire. Access is at localhost:5173
by default.
Disclaimer -- This unit test script was ran on a Windows machine, so some changes were needed. This may not work on a Linux machine, I will attempt to test this out beforehand. Update -- this now works on linux machines.
Unit tests are ran with Vitest, utilizing a Python microservice to visualize and interperet data. Python is required as stated above.
To run the unit tests, make sure you are in the root directory of the project and then simply run npm run test