13#include <unordered_map>
87 Gtk::TreeModelColumn<Glib::ustring>
col_app;
94 Gtk::TreeModelColumn<Glib::ustring>
col_ip;
121 struct ComboCol :
public Gtk::TreeModel::ColumnRecord {
123 Gtk::TreeModelColumn<Glib::ustring>
val;
202 std::unordered_map<std::string, Gtk::TreeModel::iterator>
m_groupIndex;
206 std::unordered_map<std::string, Gtk::TreeModel::iterator>
m_appIndex;
236 Gtk::TreeViewColumn* column);
238 void onVerdictEdited(
const Glib::ustring& pathStr,
const Glib::ustring& newText);
245 const std::string& app_display,
246 const std::string& argsStr,
264 void onSparkDraw(
const Cairo::RefPtr<Cairo::Context>& cr,
265 int width,
int height);
283 static std::string
groupKeyFor(
const std::string& app,
284 const std::string& protocol,
285 const std::string& host,
286 const std::string& ip,
297 static std::string
jsonFieldStr(
const std::string&
json,
const std::string& key);
void onAppActivated(const Gtk::TreeModel::Path &path, Gtk::TreeViewColumn *column)
std::deque< uint64_t > m_sparkBuckets
Gtk::TreeView m_appTreeView
Gtk::ScrolledWindow m_scroll
std::unordered_map< std::string, std::string > m_desktopIndex
Gtk::ScrolledWindow m_appScroll
ConnectionsPage(UIServer &uiServer)
Glib::RefPtr< Gtk::ListStore > m_appStore
void onSparkDraw(const Cairo::RefPtr< Cairo::Context > &cr, int width, int height)
static constexpr uint64_t kEstimatedBytesPerConn
void setLastVerdict(const std::string &verdict)
void buildDetailTreeView()
void pushDetailEvent(const std::string &app_display, const DetailEvent &ev)
std::unordered_map< std::string, std::string > m_iconCache
static std::string groupKeyFor(const std::string &app, const std::string &protocol, const std::string &host, const std::string &ip, uint32_t port)
Gtk::DrawingArea m_sparkArea
std::string currentTime()
Glib::RefPtr< Gtk::ListStore > m_store
void onVerdictEdited(const Glib::ustring &pathStr, const Glib::ustring &newText)
static std::string formatEpochTime(int64_t epoch)
std::unordered_map< std::string, Gtk::TreeModel::iterator > m_appIndex
Glib::RefPtr< Gtk::ListStore > m_verdictModel
std::unordered_map< std::string, std::deque< DetailEvent > > m_detailRings
static std::string formatBytes(uint64_t n)
std::unordered_map< std::string, AppStats > m_appStats
static std::string jsonEscapeStr(const std::string &s)
static bool jsonFieldBool(const std::string &json, const std::string &key)
sigc::connection m_sparkTick
void onNewConnection(const ConnectionInfo &info, bool pending=true)
static std::string jsonFieldStr(const std::string &json, const std::string &key)
std::string m_currentAppFilter
static constexpr int kSparkBucketMs
void populateDetailFromRing(const std::string &app_display)
void updateAppAggregate(const std::string &app_display)
void addOrUpdateDetailRow(const ConnectionInfo &info, const std::string &app_display, const std::string &argsStr, bool pending)
std::unordered_map< std::string, Gtk::TreeModel::iterator > m_groupIndex
void showDetailView(const std::string &app)
static constexpr int kSparkBucketsMax
ReplyAction parseReplyAction(const Glib::ustring &text) const
Gtk::SearchEntry m_search
static constexpr int64_t kRetentionSeconds
static std::string logPath()
static constexpr size_t kDetailRingMax
std::string resolveIconName(const std::string &app_display)
static uint32_t jsonFieldUint(const std::string &json, const std::string &key)
Gtk::TreeModelColumn< Glib::ustring > col_icon_name
Gtk::TreeModelColumn< int64_t > col_last_ts
Gtk::TreeModelColumn< Glib::ustring > col_last_seen
Gtk::TreeModelColumn< uint32_t > col_conn_count
Gtk::TreeModelColumn< uint64_t > col_bytes_raw
Gtk::TreeModelColumn< Glib::ustring > col_bytes_str
Gtk::TreeModelColumn< Glib::ustring > col_app
Gtk::TreeModelColumn< Glib::ustring > val
Gtk::TreeModelColumn< Glib::ustring > col_protocol
Gtk::TreeModelColumn< Glib::ustring > col_ip
Gtk::TreeModelColumn< Glib::ustring > col_src_ip
Gtk::TreeModelColumn< Glib::ustring > col_group_key
Gtk::TreeModelColumn< uint32_t > col_port
Gtk::TreeModelColumn< Glib::ustring > col_time
Gtk::TreeModelColumn< Glib::ustring > col_args
Gtk::TreeModelColumn< Glib::ustring > col_host
Gtk::TreeModelColumn< bool > col_pending
Gtk::TreeModelColumn< Glib::ustring > col_verdict
Gtk::TreeModelColumn< Glib::ustring > col_app
Gtk::TreeModelColumn< uint32_t > col_count
Gtk::TreeModelColumn< uint32_t > col_pid