Admin Page purpose on Web application. - HunYahiko/smart-parking-system GitHub Wiki
The purpose of the admin page developed on front-end module is to provide to administrator an layout of the parking, which is composed of parking lots, roads and non-important objects.
What basically happens is that a call to back-end is made and all the objects of one level are displayed on the screen, creating a layout of how it looks in 2D. When the layout is build, a WebSocket connection is opened, listening to all incoming message of layout update.
When a new layout update message is caught, the layout object to which is referred is checked for existence. If object exists on layout, the object composition is changed.
For now, only parking lots are changed. There are 4 basic statuses:
- Free parking lot - represented with a green colored parking lot.
- Occupied parking lot - represented with a car SVG placed on parking lot.
- Booked parking lot - represented by a yellow colored parking lot.
- Unresponsive parking lot - represented by a red colored parking lot.
For now, a single level is hardcoded for testing purposes. But it will be changed by letting the administrator select the level he wants to view. The parking the administrator can view will be selected based on which parking he is administrator at.