Commit Graph

346 Commits

Author SHA1 Message Date
Srivats P
469e0b054e Simplify .pro file by removing some duplication 2023-11-16 11:53:52 +05:30
Srivats P
23ee0e6f00 Extract libostfilegui out of libostfile
libostfile now has no GUI dependencies
2023-11-16 11:53:52 +05:30
Srivats P
8f89c577ef Extract file format UI code into separate files 2023-11-16 11:53:52 +05:30
Srivats P
c285e91d4a Extract libostfile from libprotogui
All .pro file changes only

libostfile still has GUI dependency due to PCAP import options UI.
Need to see if we can remove that - maybe extract into a separate
libostfilegui.
2023-11-16 11:53:52 +05:30
Srivats P
483f7fb4c5 Fix empty port stats when viewing rsvd ports only
This was a regression introduced in 1.3.0 as part of the port stats UX
improvement. The 'user' row was changed from the first (0) to the last,
but the proxy model continued to use a hard-coded value of 0 to check
for user to determine whether to show a port column or not.
2023-11-08 12:55:39 +05:30
Srivats P
ebe6aef62d Fix icon-only delegate
The delegate was still rendering display text. But we didn't realize
because the only place where this delegate was used was returning a
QVariant() for DisplayText role earlier. Once we started returning a
valid QString (for copy-paste purposes), this bug showed up.

This didn't work because we further delegate the actual painting to
the base QStyledItemDelegate which re-initializes option.features
from the item index values, so removing HasDisplay does not work.

The fix is to override the displayText() to return a null string.
2023-10-13 12:16:03 +05:30
Srivats P
1e8486991d Include state in port stats text copy to clipboard
The view uses an icon-only delegate for state to suppress the text
display
2023-10-11 13:07:02 +05:30
Srivats P
eb3331f74d Update copyright years in About 2023-10-11 12:57:05 +05:30
Srivats P
268fad0690 Include headers also when copying stream stats
This is for plain text copy format.

This also replaces any newlines in the header text with a space to maintain
formatting.
2023-06-26 18:08:49 +05:30
Srivats P
28b308ce6c Try and fit all stream stats column within window
* Resize columns to content (instead of using default width)
 * Use Kpps/Mpps for Pkt Rate with 3 decimal
 * Use 3 decimal places for bit-rates (is more logical because units change
   every 1000 anyway)
 * Use 2 decimal places for time interval

This just improves the chances of all columns fitting - but is not guaranteed
2023-06-26 17:03:47 +05:30
Srivats P
bfda96a888 Add jitter to Stream Stats in the GUI
These are the GUI side changes to the jitter server side changes committed
earlier.
2023-06-26 14:38:28 +05:30
Srivats P
70b5e60440 Rename delay as latency in Protobuf/RPC
The GUI uses the term 'latency', so it's better if the API alsos use the same
term instead of 'delay'
2023-05-26 11:31:52 +05:30
Srivats P
8ecbe78ddd GUI changes to display avg latency
At this time we only show per-guid latency aggregated across all ports
2023-05-26 11:31:52 +05:30
Srivats P
1056b8d170 Fix werror warning about 0 being signed by default 2023-05-26 11:31:52 +05:30
Srivats P
425e4ef261 Rename port stats names to begin with send/receive
This will hopefully make it quicker and easier for the user to find
the stats item of interest.
2023-03-04 15:31:24 +05:30
Srivats P
d950432bc9 Move port stats hidden rows to the end
This avoids having to recalculate row indices
2023-03-04 10:49:35 +05:30
Srivats P
9849973562 Visually group related port stats
A horizontal line is drawn between groups
2023-03-04 09:57:56 +05:30
Srivats P
4f6749f16d Set alternate colors for port stats row headers
All 'sent' rows including the row header have the alt color, and
the 'recv' rows including the row header has the base color. This
change should make it easier to quickly distinguish sent/recv rows
2023-03-03 17:37:43 +05:30
Srivats P
8dbd01622c Make sent/recv order consistent for port stats
Also remove sent/recv byte rates as we have bit rates and that
should be sufficient
2023-03-03 14:14:08 +05:30
Srivats P
2f3add63d8 ostinato -[hv] should output to stdout 2023-02-24 15:15:59 +05:30
Srivats P
f07cba39d5 Reset port widget current on portgroup disconnect
Failure to do so was causing a crash because port widget was trying to
disconnect signal from a non-existent port (corresponding to the current
index that was not reset) after the portgroup reconnected or another
portgroup came up and a port was selected in the port list.

This bug was a regression caused by the refactoring changes when
portwidget (and streamswidget) was extracted from portswindow.
2022-12-08 17:00:15 +05:30
Srivats P
1e50f9b095 Use errorOccurred() signal in disconnect as well
8d3f0c807f had changed the signal name in connect, but missed out in
using the new name in disconnect()
2022-11-14 17:27:47 +05:30
Srivats P
3cea0244d4 Rename port configuration slot
Adding a parameter with a default value to the existing on_XXX slot
in a previous commit makes auto connect signal-slots by name to flag
signal not found.

So rename the slot name and add an explicit connection.
2022-10-07 12:58:45 +05:30
Srivats P
8d3f0c807f Fix error msg not shown when missing packet.dll
Qt5.6 renamed the QProcess::error() signal to QProcess::errorOccurred().
Use the new signal name.
2022-09-30 20:33:25 +05:30
Srivats P
b645e02963 Double click port to open port config dialog
Or select and press Enter using the keyboard

Fixes #344
2022-09-27 11:38:03 +05:30
Srivats P
32ddf223b6 Show port name/description in port stats window
By default the port name (ifXXX for Windows) is shown. If a port has a
user description, that is shown instead of port name.
2022-09-12 15:46:06 +05:30
Srivats P
42091e5221 Allow user to add a port description
If a user description is available, that is shown in the ports window
other wise the system determined description is shown.

Updates #223
2022-09-09 12:25:17 +05:30
Srivats P
82db82d85b Save PortConfigDialog UI using Qt5 designer
No functional changes. Just whitespace and formatting changes.
2022-09-01 14:48:42 +05:30
Srivats P
97068b97e3 Use /usr/share/ostinato-controller/themes on Linux
This is because the Ostinato packaging reccomendation is to use
ostinato-agent and ostinato-controller package names. The ostinato
package is a meta package containing the aforementioned sub-packages
2022-07-29 20:54:14 +05:30
Srivats P
b296c5fddd Check duration > 0 before calculating stream rates
Avoid divide by zero error and/or inf/nan values
2022-06-22 12:56:07 +05:30
Srivats P
5e7bf77b0c
Merge pull request #350 from pstavirs/streamrates
Add average rate per GUID in stream statistics
2022-06-20 17:27:24 +05:30
Srivats P
a1d985e44b Show stream stats in GUI sorted by GUID 2022-06-16 18:14:23 +05:30
Srivats P
b8d5d9421f Show Duration 'n rates in stream stats by default
Port Pkt stats are no longer shown by default. To see them and byte
counters, use context menu option - "Show details" (renamed from the
existing "Show Byte counters")
2022-06-16 14:46:18 +05:30
Srivats P
2868806f3f GUI side changes for displaying stream rates
At the moment, the Tx duration for a GUID is taken to be the largest of
all tx duration for that GUID across all ports. In the future, we may
consider changing it to average instead of largest.
2022-06-16 12:30:13 +05:30
Srivats P
ccf5b5ca47 Add a few asserts to debug GUI client crash
The crash seems to happen in the following scenario -
 * Ostinato and drone are both running (with some devices/streams)
 * Kill and restart drone
 * Wait for GUI to reconnect to drone
 * Click on one of the ports in the port list
2022-06-09 20:32:22 +05:30
Srivats P
c03038167c Initiate ARP/NDP resolve during session open
The current implementation won't work for all cases. See the notes added
in the code.

Updates #311
2022-06-09 20:30:42 +05:30
Srivats P
26d0c8ab9c Skip not-included fields in variable fields list
Optional protocol fields not included in the packet have bitSize = 0
2022-05-23 13:31:01 +05:30
Benjamin
9d4aaa4f7b
Update portstatswindow.ui 2022-04-16 19:14:44 +02:00
Srivats P
7374c74b95 Increase default width of port list pane
The list and detail panes were currently set to 1:2, so that the list
pane is 1/3rd the width. But for some reason it is not working like I
expect it to work. Setting it 1:1 looks better.
2022-02-12 19:26:18 +05:30
Srivats P
6f433bb7a1 Move View menu immediately after Edit menu
This seems to be the convention and also recommended by MacOS HIG
2022-02-11 18:34:06 +05:30
Srivats P
2ee19da15c Add Stream and Device menus to main window menu bar
Stream and Device related actions from the File menu has been moved
under these new menus
2022-02-11 18:09:30 +05:30
Srivats P
22b8c405f7 Use palette colors for stream stats
Using harcoded colors leads to unexpected results in dark mode.
2022-02-11 11:37:03 +05:30
Srivats P
2ce7f0c7a0 Disconnect portgroup before removing from list
Disconnecting _during_ remove sometimes causes crash because disconnect
triggers the logs window alert which **can** lead to repainting of
other windows which access port groups which have not been synced after
the removal of one or more portgroups.

Also emit endRemoveRows after each portgroup so that begin/end signals
match.
2022-02-10 20:34:10 +05:30
Srivats P
041f500e65 Avoid crash at GUI start up
The crash can happen before mainWindow is allocated. Don't remember how
that happens, but I have seen it happen!
2022-02-09 21:30:51 +05:30
Srivats P
7dd070fd98 Fix packet dump view bg color when using dark theme
Qt already paints the background before calling the paint event, so we
don't need to repaint it.
2022-02-07 21:44:40 +05:30
Srivats P
ac52844b3f Don't stretch stream config simple protocols widget
Only avoid the vertical stretch by adding a spacer, let horizontal still
stretch
2022-02-05 21:22:32 +05:30
Srivats P
341d0c3be8 Install themes as part of 'make install'
Tested only on Windows; pending on MacOS/Linux
2022-01-30 13:13:20 +05:30
Srivats P
6534312968 Look for themes in different locations on Mac/Unix
Not tested yet - since I'm coding this currently on Windows
2022-01-30 12:15:17 +05:30
Srivats P
a089cc1751 Update material themes and add qds themes 2022-01-29 12:24:08 +05:30
Srivats P
0587e22de9 Add theme-manager and qt-material themes 2021-12-24 21:36:14 +05:30