</td>
              <td><button class="btn-view-details">View Details</button></td>
          `;

          const viewDetailsBtn = tr.querySelector('.btn-view-details');
          viewDetailsBtn.addEventListener('click', () => showLogDetails(time, method, endpoint, status, duration, requestOptions));

          if (logsTableBody.children.length > 1) {
              logsTableBody.insertBefore(tr, logsTableBody.children[1]);
          } else {
              logsTableBody.appendChild(tr);
          }

        