From 426c50a90d5de6a24e6bd699365bbb90d3f170d9 Mon Sep 17 00:00:00 2001 From: Justas Balcas Date: Wed, 17 Jul 2024 17:05:07 -0500 Subject: [PATCH 1/2] Fix HTTP UI and calls for debug actions --- src/html/newdebug.html | 50 ++++++++++---------- src/python/SiteFE/REST/Modules/DebugCalls.py | 2 +- src/python/SiteRMLibs/BaseDebugAction.py | 2 +- 3 files changed, 28 insertions(+), 26 deletions(-) diff --git a/src/html/newdebug.html b/src/html/newdebug.html index 02615bb..a2e01c1 100644 --- a/src/html/newdebug.html +++ b/src/html/newdebug.html @@ -28,8 +28,7 @@ } $.post("/"+params['sitename']+"/sitefe/json/frontend/submitdebug/NEW", params, function(result){ newAlert("New debug action submit state:" + JSON.stringify(result), params); - }); - } + })} function doSiteUpdate(ids) { @@ -39,10 +38,7 @@ success: function(json){ for (j=0; j < json.length; j++){ addDropDown(json[j]['hostname'], $("#" + ids + "hostname")); - } - } - }); - } + }}})} function doSiteUpdateN(ids) { strSite = document.getElementById(ids + "sitename").value; @@ -50,11 +46,10 @@ for (i=0; i < data['general']['sites'].length; i++){ sitename = data['general']['sites'][i]; if (strSite === sitename) { - for (const [switchname] of Object.entries(data[sitename]['switch'])) { - addDropDown(switchname, $("#" + ids + "hostname")) - }}}})} - - + const switchArray = data[sitename]['switch']; + switchArray.forEach((name, index) => { + addDropDown(name, $("#" + ids + "hostname")) + })}}})} function doDTNUpdate(ids) { strDTN = document.getElementById(ids + "hostname").value; @@ -148,7 +143,7 @@

Request New Debug Action

Rapid Ping (from Host)

-
+
Rapid ping - very similar to Flood ping implemented in FreeBSD. where a minimum of 100 packets are sent in one second or as soon as a reply to the request has come.
It will execute the following command on selected hostname: ping -i <interval> -w <runtime> <ip> -s <packetsize> -I <Interface>

@@ -177,7 +172,7 @@

Rapid Ping (from Host)

- @@ -254,7 +249,7 @@

TCPDump (from Host)

ARP Table

-
+
The ip neigh command manipulates neighbour objects that establish bindings between protocol addresses and link layer addresses for hosts sharing the same link. Neighbour entries are organized into tables. The IPv4 neighbour table is also known by another name - the ARP table.
The corresponding commands display neighbour bindings and their properties. @@ -288,9 +283,9 @@

ARP Table

-

IPerf Client (from Host)

+

IPerf Server (from Host)

-
+
iPerf3 is a tool for active measurements of the maximum achievable bandwidth on IP networks. It supports tuning of various parameters related to timing, buffers and protocols (TCP, UDP, SCTP with IPv4 and IPv6). For each test it reports the bandwidth, loss, and other parameters.
@@ -320,13 +315,13 @@

IPerf Client (from Host)

- +
- +
- @@ -353,9 +348,9 @@

IPerf Client (from Host)

-

IPerf Server (from Host)

+

IPerf Client (from Host)

-
+
iPerf3 is a tool for active measurements of the maximum achievable bandwidth on IP networks. It supports tuning of various parameters related to timing, buffers and protocols (TCP, UDP, SCTP with IPv4 and IPv6). For each test it reports the bandwidth, loss, and other parameters.
@@ -393,6 +388,13 @@

IPerf Server (from Host)

+
+ +
- +
- +