Commit Graph

335 Commits

Author SHA1 Message Date
Srivats P
c1610f4c99 Derive field max from bitSize instead of saving it 2021-12-09 09:52:42 +05:30
Srivats P
dc7ac89c30 Verify find/replace mask works for all field types 2021-12-09 08:26:35 +05:30
Srivats P
4c6d8f35d6 Verify and fix Ip6Address type field edit 2021-12-08 21:36:39 +05:30
Srivats P
2eab3daa2f Set placeholder text for field edit types uint/mac 2021-12-06 21:14:38 +05:30
Srivats P
7cf9c91014 Verify and fix Ip4Address type field edit 2021-12-06 20:56:40 +05:30
Srivats P
9385b31bc5 Verify and fix MacAddress type field edit
Use QRegularExpression instead of QRegExp as the latter is deprecated in
Qt6
2021-12-05 12:09:02 +05:30
Srivats P
d3400f0897 Validate find-replace value based on field type
Only kUInt64 type has been verified for this commit.

Others are pending.
2021-12-04 12:17:37 +05:30
Srivats P
b60aad45d1 Implement find-replace logic for fields <= 64 bits 2021-12-03 19:01:32 +05:30
Srivats P
e19083ed3f Fleshed out some of the find-replace code 2021-11-27 22:13:55 +05:30
Srivats P
990c13e67a Add Find & Replace UI with skeletal code 2021-11-26 22:30:45 +05:30
Srivats P
a1c165b7b3 Fix MacOS build break 2021-11-17 18:39:14 +05:30
Srivats P
f731b48676 Allow k/m units as input to port pps/bps
Also,
  * Revert to old value if new input is not valid
  * Refactored auto calc and display of rate to XLocale
2021-11-11 21:38:57 +05:30
Srivats P
910fccbfc6 Change port bit rate display unit automatically
This is for user convenience and easier comprehension
2021-11-10 19:22:49 +05:30
Srivats P
27e853e6e8 Reduce UI width of load % input box 2021-11-09 22:21:12 +05:30
Srivats P
dd7f4a6fd0 Add load % as an input for port rate 2021-11-07 19:05:11 +05:30
Srivats P
14993073fe Extract portWidget from streamsWidget 2021-11-06 19:18:48 +05:30
Srivats P
295fc93e7b Prepare to extract portWidget from streamsWidget 2021-11-05 15:32:23 +05:30
Srivats P
0a825a0aa3 Extract streamsWidget code out of portsWindow
All functionality seems to be working, so hopefully no regressions!

It does appear to me that portWidget can be extracted out of
streamsWidget
2021-11-05 15:27:37 +05:30
Srivats P
214c774fc6 Prepare to extract streamsWidget code from portsWindow 2021-11-05 13:02:19 +05:30
Srivats P
b52d1c5be3 Extract streamswidget.ui out of portswindow.ui
Only UI extraction is done. PortsWindow is still a combined class that
will be separated in the subsequent commit(s).

Although this commit builds successfully, but the stream actions don't
work because the stream widget's signals are not connected to port
window's slots
2021-11-05 13:02:19 +05:30
Srivats P
d9d68ad65c Prepare to extract streamsWidget out of portsWindow 2021-11-05 13:02:19 +05:30
Srivats P
d77074da1a Upgrade portswindow.ui to QtDesigner 5.9.4 2021-11-05 13:02:19 +05:30
Srivats P
9789d475a8 Show/hide the Next column in stream list on tx mode change 2021-10-21 21:52:54 +05:30
Srivats P
9c44bb8e12 Update stream view actions after opening a streams file
Fixes #312
2021-09-25 12:41:31 +05:30
Srivats P
d5365a25d4 Add IMIX as a Frame Length mode
Use Simple IMIX as defined in Wikipedia - Frame lengths 64, 594, 1518 in
a 7:4:1 ratio
2021-09-23 08:11:22 +05:30
Srivats P
a1705e7619 Try to reconnect with drone after disconnect
This used to work earlier, but got broken when the incompatibility check
was added as we didn't want reconnect to be initiated if versions were
incompatible.

This fix will always try to reconnect, except for following cases -
 * Compatibility check is false
 * Bad data received from drone
 * User triggered disconnect

Fixes #333
2021-04-25 10:52:42 +05:30
Srivats P
bcc21ccded Gracefully handle portgroup disconnect during Apply
Fixes #326
2020-12-27 17:00:28 +05:30
Srivats P
c97a359f85 Warn about retreiving stream stats from a transmitting port
Tx stream stats are available only after transmit is finished.

Fixes #334
2020-12-27 11:28:18 +05:30
Srivats P
ea31cf30fb Select previous tab when a stream stats tab is closed
The default behaviour was to select the tab to the right of the
closed tab which is not very useful for us since the right tab
will be the Logs tab.

Fixes #331
2020-12-27 11:16:39 +05:30
Srivats P
640e7029b9 Fix port reservation getting cleared incorrectly
This would happen when other port config properties were modified but
the reserve checkbox itself was not modified.

Fixes #317
2020-10-23 13:21:02 +05:30
Srivats P
43fe3964f9 Fix unknown GUID 4294967295 in stream statistics
4294967295 (0xffffffff) is actually used internally by Ostinato for the
Total or Aggregate stats. When stream stats are fetched from more than
one portgroups, a kAggrGuid entry was added for each portgroup in the
GUID list. However, the GUI only tags the last row with the kAggrGUID as
the "Total" row.

Fix is to ensure we add kAggrGuid only once to _guidList.
2020-10-23 12:42:57 +05:30
Srivats P
f2635acb09 Hide the SVG label at creation
When required the appropriate pixmap (error/warn) will be set and the
label will be shown.
2020-06-13 21:36:51 +05:30
Srivats P
23d855f201 Add svg module to required QT modules
MacOS seems to need svg module to show SVG icons
2020-06-13 21:35:53 +05:30
Srivats P
2028d0f25b Start the error/warn animation from center of app
Irrespective of whether logs window is visible or not, show and
animate the icon from the center of the main window; end point is center
of logs window if visible, or the logs window tab icon if not visible.
2020-05-31 21:01:10 +05:30
David Mueller
f14c02b065
Add missing include cmath 2020-05-13 09:28:59 -07:00
Srivats P
1f8bfd2393 Update copyright to 2020 in About 2020-05-13 20:48:37 +05:30
Srivats P
8859a4c152 Tweak the animated error/warn GIF icons
Two frames were deleted from each end of the sequence so that the icon
never goes fully white/blank
2020-05-13 20:39:45 +05:30
Srivats P
f92161e755 Add XXX note about LogsWindow::isVisible_ 2020-05-10 19:19:32 +05:30
Srivats P
0e72a58dd7 Call attention to the warn/error logs using animation 2020-05-10 18:43:08 +05:30
Srivats P
dccf2042f0 Abort connection if bad data received from drone
Currently we would crash because of qFatal(). The new behaviour is
better. Error is reported in the logs window alongwith a suggestion on
what to check.
2020-05-09 09:50:32 +05:30
Srivats P
1e1e0b0c48 Clear current and selection when restoring default view
This is done for all top level windows - ports, stats, logs

At startup, the local portgroup would automatically become current with
the result that the welcome page would not be visible. Not sure why but
an explicit setFocus of ports window seems to avoid it.
2020-05-07 18:40:31 +05:30
Srivats P
f309ce99cc Set top and bottom docks to equal height at startup 2020-05-06 18:01:44 +05:30
Srivats P
2006674fc1 Print Settings path at startup for debug 2020-05-06 17:52:18 +05:30
Srivats P
ad38a60171 Fix valid count range for variable fields
To allow full range of a field, the "count" of a variable field,
 * Minimum should be 1, not 0
 * Maximum should be max value of field + 1

Fixes #301
2020-05-04 19:15:49 +05:30
Srivats P
0897ae6dad Fix awk not found while importing pcap on Windows
For non-Windows platforms, the default paths for awk, diff, gzip are
fixed at compile time since these are standard utilities for these
platforms. However, for Windows, we ship these utilities along with
Ostinato, so we need to set default path as the application directory
which is known only at run time. This is done as part of
Preferences::initDefaults() and therefore should be called before
setting OstProtoLib external program paths
2020-04-09 18:43:00 +05:30
Srivats P
79ac3a2a20 Fix plain text copy to print selected columns
The case being fixed is when non contiguous columns were selected, e.g.
column 3 and 7
2020-03-22 13:26:38 +05:30
Srivats P
6791eb06dd Change port stats to use XTableView to support copy paste
Also fix plain text copy to only include selected column headers if the
selection behaviour is SelectColumns
2020-03-20 22:15:13 +05:30
Srivats P
fae0bdb611 Remove copy support from Logs Model
XTableView now supports plain text copy for all models, so we don't need
this code in Logs Model
2020-03-18 20:56:07 +05:30
Srivats P
e6213a90ac Copy to clipboard in plain text format also
The plain text copy is written generically and should work with any
model that is attached to a XTableView
2020-03-18 20:50:29 +05:30
Srivats P
3b31a4fade Fix crash when updating 'cut' status
Also added a failsafe to workaround at run time if more problems are
detected in the field while updating cut-copy-paste action status
2020-03-17 18:50:20 +05:30
Srivats P
92fc7f140b Use a better heuristic to determine model canCut() 2020-03-17 18:49:12 +05:30
Srivats P
12f81a1dba Enable/Disable cut-copy-paste actions as required
Cut: focus widget has a selection, a 'cut' slot and 'canCut'
Copy: focus widget has a selection and a 'copy' slot
Paste: focus widget has a 'paste' slot and can accept the clipboard item
2020-03-16 22:26:16 +05:30
Srivats P
7227dd734b Fix build break due to missing include file 2020-03-14 21:42:29 +05:30
Srivats P
18d024481f Add cut-copy-paste to Edit menu and context-menu
Actions have been added to context-menu for stream list and device group
list only for now.
2020-03-14 21:13:24 +05:30
Srivats P
4b16c95b2a Add cut-copy-paste support for devicegroups 2020-03-11 18:19:55 +05:30
Srivats P
43f6959dcc Add cut-copy-paste support for streams 2020-03-11 18:19:55 +05:30
Srivats P
fd6f2c2508 Move copy support for Logs Window to Logs Model
The model is the correct place to determine what data gets copied. This
also paves way to support other models where the data to be copied is
not plain text
2020-03-11 18:19:55 +05:30
Srivats P
88ddb97a52 Find Wireshark exe path when given .app path
Also change the default Wireshark path value to match what recent
versions of Wireshark are using

Fixes #288
2020-02-14 18:47:02 +05:30
Srivats P
3889780d79 Allow editing of external program paths in Preferences
GUI file picker can still be used, but is not required.

Updates #288
2020-02-13 18:28:21 +05:30
Srivats P
018a8490cf Fix stream rate calculation when avg rate changes from 0 to > 0
Fixes #294
2020-01-30 18:06:47 +05:30
Srivats P
d2ae04c488 Fix session file not saving port stream stats 2020-01-19 12:04:57 +05:30
Srivats P
518c7b804b Change logo icon to the full logo instead of a quadrant
* Changed Main Window icon - should change icon in taskbar also
* Changed Windows Icon
* Changed MacOS Icon
2019-08-28 21:37:45 +05:30
Srivats P
a88cfe35bb Increase main window height to make room for stats 2019-08-28 18:26:09 +05:30
Srivats P
c8a4c3eee9 Restore XTreeView functionality
I thought Qt5 had fixed this behaviour 'bug', but apparently not. So we
still need XTreeView - for Qt5 also.
2019-08-24 12:14:50 +05:30
Srivats P
36e0a64f81 Revert "Use persistent model index in devices widget"
This reverts commit 46dd028a33.

The above commit caused a regression - issue #281

As seen in valgrind, crash was caused by portModel reset writing into
a freed block - presumably pertaining to persistent indexes. The block
was freed by the persistent index itself earlier when it was set to
invalid - so the model should not have been accessing that.

The application code seems correct - maybe the Qt code has a bug?
Unlikely but not impossible. For now go back to using QModelIndex
instead of QPersistentModelIndex

Fixes #281
2019-08-24 11:59:41 +05:30
Srivats P
46dd028a33 Use persistent model index in devices widget 2019-08-10 18:55:23 +05:30
Srivats P
6974f4016f Replace the deprecated qSort with std::sort 2019-07-26 21:24:25 +05:30
Srivats P
0a2154d31b Re-add about.png icon that was removed by mistake 2019-07-10 21:07:38 +05:30
Srivats P
23bc0c6890 Add 2019 to copyright years in About dialog 2019-07-10 20:39:58 +05:30
Srivats P
6e551017f4 Show all ports in port stats window at startup
If one or more ports were reserved, these were not shown at client
startup
2019-07-04 19:17:22 +05:30
Srivats P
98378b52e6 Fix ClearAllStats with View Reserved Ports Only 2019-07-04 19:00:13 +05:30
Srivats P
5e565167f2 Fix build break due to fprintf in previous commit 2019-07-02 19:14:38 +05:30
Srivats P
f24a6719fa Disable logs by default in release mode
Enable logs if '-d' command-line option is given.

Additional command-line options -
-v : print version
-h : print usage

Drone only:
-p <port-number> : use given port number for the RPC service
2019-07-02 18:25:31 +05:30
Srivats P
3fca24396d Report "Apply" time in logs 2019-07-02 18:24:55 +05:30
Srivats P
913ef5c0ee Add start/stop tx buttons to stream list window 2019-06-19 22:22:01 +05:30
Srivats P
6817d3f870 Resolve neighbors before build as part of "apply" 2019-05-31 18:34:07 +05:30
Srivats P
edc7ed677c Mark sync complete after build finish during apply
Since build is now the last step during "apply", use that to mark sync
complete. Since build will always be called irrespective of whether any
changes were made to devices/streams, we can now send the stream RPCs
only if required.

Additionally log RPC calls only if they are actually made.
2019-05-28 19:02:50 +05:30
Srivats P
7cf323202f Add new build() RPC
Make build an explicit RPC so that clients can call resolveNeighbor
before build
2019-05-28 18:46:58 +05:30
Srivats P
dbbb7597a4 Add Check for updates to main menu
Results will be displayed in a message box - if we have a new version or
if we are running the latest version.

Update check at startup will show message box only once in 5 days, other
times it will be shown in the status bar. If we are already on latest
version, nothing is shown.
2019-05-22 18:49:51 +05:30
Srivats P
52b522f92a Show new version availability in a message box 2019-05-22 18:49:51 +05:30
Srivats P
cd9758f165 Merge branch 'master' into hostdev 2019-04-11 18:56:49 +05:30
Srivats P
2614eb8645 Retrieve devices at startup even if no device groups
Now that we have host devices, we can have devices without having a
device group
2019-03-11 19:15:08 +05:30
Srivats P
2cd64061d1 Fix warning - no matching signal
For slot MainWindow::on_actionOpenSession_triggered(QString)
2019-02-26 18:12:18 +05:30
Srivats P
4a1b41670c Wrap LogsWindow contents 2019-02-25 21:45:39 +05:30
Srivats P
983a155ccf Update Qt icon for Help | About Qt menu item 2019-02-22 21:54:51 +05:30
Srivats P
0d1b4be682 Connect to local portgroup later in the app startup sequence
This allows drone to init itself and wait for connections before we
attempt to connect to it

Fixes #266
2019-02-22 20:34:59 +05:30
Srivats P
00bc01898d Show a progress dialog during Apply
The most time spent during apply is during packet rebuilding.
Unfortunately, there is no feedback from the drone to know the actual
progress, so this is just a busy indicator for now.

I tried to put a jump url to the FAQ on why it takes time, but 'coz the
app cursor is a "wait cursor", user cannot click on any widgets/elements
inside the dialog box - so this won't work.

Iterate on this dialog and what it displays based on user feedback.
2019-02-22 18:58:13 +05:30
Srivats P
9003d339bc Display all RPC failures and errors in the logs window 2019-02-21 20:51:18 +05:30
Srivats P
95578e5094 Add animated icons to LogsWindow tab 2019-02-10 18:15:35 +05:30
Srivats P
8b9cceb7ed HostDev: Return smac/dmac resolve failure via RPC 2019-02-09 17:16:31 +05:30
Srivats P
90d93d52e1 Merge branch 'master' into hostdev 2019-02-05 20:34:00 +05:30
Srivats P
6d438e2816 Fetch updated device info after resolve/clear neighbors
This matches the behaviour of these buttons within the devices widget
2019-02-02 13:26:40 +05:30
Srivats P
9d97fefad3 Add Resolve/Clear buttons to Device Info window
Fixes #189
2019-01-21 19:18:36 +05:30
Srivats P
1d6db2a86f Fix vertical alignment of Device Config row contents 2019-01-21 19:15:06 +05:30
Srivats P
7b8c5a878a Add Help|Donate menu item 2018-12-18 19:36:21 +05:30
Srivats P
cbf9ab1812 Change outbound URLs to https where available 2018-12-14 23:04:47 +05:30
Srivats P
c1f94ac5d4 Show both icon & text for the Status cell tooltip 2018-12-04 21:51:04 +05:30
Srivats P
f550cb0605 Adorn portList linkState icon with transmit/capture indicators
The new 'exclusive' indicator may need more work in the future
2018-12-03 21:14:05 +05:30
Srivats P
7409a98b6a Replace QFlags.setFlag() with &= for Qt 5.6 compatibility 2018-11-29 21:20:06 +05:30
Srivats P
496e044bdd Replace Port Stats Link/Tx/Capture state text with icons
* All 3 icons are combined into a single row instead of 3 separate rows
* Tooltip to clarify meaning of icons
* Qt Model-View displays icon left-aligned, so use a custom delegate to
  center-align it
* Add a icon for "Transmit On"
* Edit icons for "Start/Stop Capture"
2018-11-29 20:44:03 +05:30