Commit Graph

284 Commits

Author SHA1 Message Date
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
Srivats P
5eea62f4f4 Fix build break by renaming xlocale.h to avoid name clash 2018-09-15 11:40:11 +05:30
Srivats P
c673141f33 Bugfix: Remove group separator when converting string to number
Fixes #240
2018-09-14 20:24:30 +05:30
Srivats P
a1962c7887 LogsWindow: Fix build break 2018-08-24 09:12:40 +05:30
Srivats P
509d777500 LogsWindow: Improve UX
* Timestamp at millisec resolution
* Log level selection - Info by default
* Auto scroll control - enable(default)/disable
* Support copy (selected) logs to clipboard
* Support clear logs
* Annotate dock window title, if not on top (aka visible)
2018-08-23 23:23:07 +05:30
Srivats P
489099ca83 LogsWindow: Add missing log.h 2018-08-20 20:57:23 +05:30
Srivats P
bb80be30a6 LogsWindow: Add RPC info/warn/error logs 2018-08-20 20:40:58 +05:30
Srivats P
d0def8a0ec LogsWindow: Add basic UI and infra 2018-08-17 18:55:58 +05:30
Srivats P
e2a11bfa4e Show prefixLength for IPv6 devices 2018-08-15 10:50:10 +05:30
Srivats P
9a4e7e7550 Silence warnings 2018-05-22 21:48:21 +05:30
Bernhard Ehlers
1d8bb9f4df Fix warnings about DumpView::dataChanged and struct StatsTuple 2018-05-21 21:31:44 +02:00
Andreas Sturmlechner
53308971e6
Fix build with Qt 5.11 (missing QButtonGroup) 2018-05-12 01:16:10 +02:00
Srivats P
a16eefbff4 Treat warnings as errors and fix existing warnings 2018-04-20 20:50:51 +05:30
Srivats P
227b8bdae4 Use modeltest only for debug and if Qt >= 5.7
The modeltest code is not compatible with Qt 5.6 LTS
2018-04-02 20:39:44 +05:30
Srivats P
db231054da Fix Qt4 to Qt5 porting issues with debug build
Also update modeltest to Qt5
2018-03-27 20:02:36 +05:30
Srivats P
f801982830 Port common, rpc and client code to Qt5
Still pending
* server port to Qt5
* verify/test the port
2018-03-14 21:58:56 +05:30
Srivats P
1347165ef0 Add helpful hint text to variable fields widget 2018-02-21 21:57:46 +05:30
Srivats P
52a5cb0d30 Improve UX for variable fields configuration
* Redesign the toolbar buttons to be similar to port stats
* Show protocols with variable fields in bold
* Variable field list will always have a 'current', if not empty
* Adding a new variable field makes it 'current' for immediate edit
* Each protocol remembers its 'current' variable field

Also renamed UserRole to a more widget specific enum
2018-02-10 12:40:10 +05:30
Srivats P
57597fe794 Merge branch 'master' of D:/srivatsp/projects/ostinato/master 2018-02-08 22:39:52 +05:30
Srivats P
0b407af04c Use alternate row colors for port stats window
This makes it more readable. Unfortunately, the alternate row colors
don't apply to the row headers. QHeaderView is supposed to support
QBackgroundRole but there's a long pending bug on the Qt side for the
same - https://bugreports.qt.io/browse/QTBUG-31804
2018-02-08 22:39:22 +05:30
Srivats P
d370907597 Fix max value of step/count for counter32 var fields 2018-02-07 20:45:43 +05:30
Srivats P
f756ead433 Add Tx/Rx bps to GUI stats window
bps stats are derived from the Bps stats and represent line rate taking
into account the per packet overhead on the line with the following
assumptions -
* Link type is Ethernet
* Bps (and total Bytes) stats don't include the 4-byte FCS

Fixes #241
2018-01-31 16:03:34 +05:30
Srivats P
3f780fe564 Fix error message to specify -c instead of -s 2018-01-01 09:43:27 +05:30
Srivats P
ddafdc0073 Update copyright years in about dialog 2018-01-01 09:39:54 +05:30
Srivats P
c0f94ec58c Use static linking on win32 2017-12-07 19:04:18 +05:30
Srivats P
847af21c43 Rename ostinato option -s to -c (controller only) 2017-12-07 19:03:28 +05:30
Srivats P
92d4c260a0 Stream stats UX improvements
* Enable button only when one or more port is selected
* Reorder the button to make it first in the stats group
* Show some helpful text instead of a blank window when no stream stats
are available
2017-12-06 20:47:26 +05:30
Srivats P
bfd31179dc Add thousands separator to port stats
Fixes #201
2017-12-06 18:43:00 +05:30
Srivats P
c3adc74351 Merge branch 'master' of D:/srivatsp/projects/ostinato/master 2017-12-06 18:21:25 +05:30
Srivats P
6dd6511269 Merge branch 'master' into sign 2017-12-03 12:59:26 +05:30
Srivats P
81e7e735bc sign: Resolve a few FIXMEs
* Rename track_stream_stats to is_tracking_stream_stats for consistency
with other bool params
* Change signature magic value to CODA
* Resolve notify memory leak
2017-12-03 11:26:09 +05:30
Srivats P
b60faa727c UX: Include FAQ url in portgroup hint page 2017-10-24 18:37:30 +05:30
Srivats P
b3fb053cca Change all URLs to jump URLs 2017-10-10 21:36:06 +05:30
Srivats P
f9b83763bd UX: Change apply hint color to red
Changing the color to be same as the port name color shows that these
are related
2017-10-05 20:04:23 +05:30
Srivats P
c53a1866b8 UX: Show stream check results as a bulleted list 2017-09-30 22:17:06 +05:30
Srivats P
57e8fe7236 UX: Report more drone startup errors
* Changed drone exit code from -1 to 1 'coz typically exit codes are
between 0 and 255
* Detect and report drone TCP port bind failure
* In all the following drone errors are reported (including previous
  commits) -
  * Drone already running (TCP port bind failure)
  * Drone executable not found
  * Packet.dll not found (Win32 only)
* The following conditions should NOT be reported
  * Start/Stop Ostinato
    * Stop before 5sec
    * Stop after 5sec
2017-09-26 19:59:49 +05:30
Srivats P
a2b349e5b7 Inform user about Drone version incompatibility 2017-09-25 21:26:57 +05:30
Srivats P
de04acec98 Tweak error message when local drone start fails 2017-09-23 18:54:42 +05:30
Srivats P
ce7f9d808f Fix missing MsgBox on packet.dll missing
started is emitted before the missing dll is detected, so user a timer
to disconnect the signal-slot connection
2017-09-23 18:53:12 +05:30
Srivats P
d32253b699 Make URL in new Version status message clickable
Additionally this message is now permanently visible won't be replaced
or obscured by other (temporary) messages
2017-09-23 17:28:35 +05:30
Srivats P
b2291eb1c0 Tweak text for Port Group has no ports 2017-09-23 16:47:02 +05:30
Srivats P
6bd687e2bc UX: Enhance StreamConfigDialog
* Add stream name/enabled fields to dialog
* Change Dialog title to include current stream name
2017-09-22 20:45:42 +05:30
Srivats P
7d4f285d8d UX: Tweak welcome message 2017-09-21 21:11:34 +05:30
Srivats P
1047f0b1d8 Fix warning 2017-09-21 20:50:24 +05:30
Srivats P
fd8db1cf15 UX: Add text hints to Devices Widget 2017-09-21 20:43:54 +05:30
Srivats P
f62a3be54a UX: Don't allow edit of non-contiguous streams
Allowing this has potential of confusion for user when using Prev/Next
2017-09-20 22:05:13 +05:30
Srivats P
fd243f6847 UX: Open StreamConfigDialog on add stream
Add+Edit is now reduced to single step. For new users, it is easier to
comprehend this single step and no text hint is needed for edit
2017-09-20 22:00:47 +05:30
Srivats P
360fa13c97 UX: Edit multiple streams in the StreamConfigDialog
The dialog now accepts a list of streams as input and has prev/next
buttons to tranverse through the list making changes in one or more of
the streams
2017-09-17 13:18:44 +05:30
Srivats P
509e9d5398 Change Stream Config Dialog inputs
This is the first of many commits that lays the foundation for -
  * Editing multiple streams without exiting the dialog
  * Triggering the dialog when a new stream is added instead of add+edit
2017-09-16 12:30:00 +05:30
Srivats P
db77563466 UX: Change port name color if local config is changed
Although the applyHint is also changed in this case, the applyHint is
visible only when the port is selected. Having the port name in a
different color is a visual hint to the user that Apply is pending
2017-09-16 12:12:43 +05:30
Srivats P
3aa44343f0 Add new entry at end if nothing selected in stream/devGrp list 2017-09-14 21:01:56 +05:30
Srivats P
cca2e94bb3 Detect when port config has changed and needs to APPLY'd
For now we prompt user to click Apply, in future we can use this to do a
"Auto Apply"
2017-09-14 20:38:13 +05:30