Skip to content

Information Sidebar

Adryan Pintratama Amarcha edited this page Jun 21, 2025 · 1 revision

6. Real-time Information Sidebar

The sidebar provides an at-a-glance summary of the active MikroTik device's health and vital statistics. It is designed to be always visible on larger screens, offering persistent, real-time insights.

  • Purpose: To give network administrators a quick and digestible overview of the router's core performance metrics without needing to navigate to a different page. The sidebar contains the DeviceInfo component which handles the display of all data.

  • Data Source: All information displayed in the sidebar is sourced from the resource object, which is provided by the MikrotikProvider context. This data is updated in real-time through the persistent WebSocket connection established with the backend server.

Key Information Displayed

  1. CPU Load Doughnut Chart:

    • Displays the current CPU utilization of the MikroTik device as a percentage.
    • The chart is rendered using react-chartjs-2 and is updated with every data batch received from the WebSocket, providing a smooth, real-time visualization.
  2. RAM Usage Doughnut Chart:

    • Similar to the CPU chart, this visualizes the percentage of used RAM out of the total available memory on the device.
    • It calculates the usage based on the total-memory and free-memory fields from the resource data.
  3. Device Vitals:

    • A list of key hardware and software details is displayed for easy reference:
      • Board Name: The model name of the MikroTik router (e.g., "RouterBOARD 951Ui-2HnD").
      • OS Version: The version of RouterOS currently running on the device.
      • Uptime: How long the device has been running since its last reboot. This value is parsed into a more human-readable format (e.g., "1 week 2 days 5 hours").

Clone this wiki locally