The Web Interface

The web interface for the IMS Logger is build using Django. Within the Django project, there are five apps. Four of those are APIs.

  • The LoggerAPI, which connects the frontend with the backend server.
  • The LogsAPI, which provides opperations for reading logs.
  • The LiveAPI, which connects the frontend directly to PLCs
  • The ViewsAPI, which provides opperations for reading and writing views. Views are custom pages that display log data, calculated columns, and statistics.

The fifth app is the frontend, which uses React to create a dynamic user interface.

Configuration#

To control the configuration of Django, use the following environment variables.

  • DEBUG
  • DJANGO_ALLOWED_HOSTS

Configuration that is not dependant on the environment (production or development) can be done in the ./WebInterface/settings.py file.

Source File Structure#

The source code for the frontend is stored in the imslogger-webinterface repository with the following file structure.

๐Ÿ“ LiveAPI
๐Ÿ“ urls.py
๐Ÿ“ views.py (logic for the API goes here)
...
๐Ÿ“ LoggerAPI
...
๐Ÿ“ LogsAPI
...
๐Ÿ“ ViewAPI
...
๐Ÿ“ WebInterface (settings for django)
๐Ÿ“ frontend (the frontend react app)
๐Ÿ“ Other files...