LogViewer
A modern log viewer with AI-assisted analysis (Qt 6)
Loading...
Searching...
No Matches
ui::qt::DashboardPanel Class Reference

Dashboard panel showing log file overview and quick statistics. More...

#include <DashboardPanel.hpp>

Inheritance diagram for ui::qt::DashboardPanel:
Inheritance graph
Collaboration diagram for ui::qt::DashboardPanel:
Collaboration graph

Signals

void ExportRequested ()
 
void GenerateReportRequested ()
 
void BookmarkCurrentRequested ()
 

Public Member Functions

 DashboardPanel (QWidget *parent=nullptr)
 
 ~DashboardPanel ()=default
 
void SetEventsSource (db::EventsContainer *events)
 Set the events container to display stats for.
 
void SetFilePath (const QString &path)
 Path of the loaded log file (name, format, size and time range are shown for it).
 
void UpdateStats ()
 Manually trigger stats update (called automatically on events change)
 
void Refresh ()
 Refresh dashboard (called from lazy refresh cycle)
 
void RecalculateStats ()
 Force immediate recalculation of statistics.
 

Private Slots

void OnExportClicked ()
 
void OnReportClicked ()
 
void OnBookmarkClicked ()
 
void OnEventsChanged ()
 

Private Member Functions

void CreateLayout ()
 
void UpdateFileInfo ()
 
void UpdateEventStats ()
 
void UpdateTopActors ()
 

Static Private Member Functions

static QString FormatNumber (qint64 count)
 Helper to format large numbers (1234567 → "1.2M")
 
static QString GetLevelIcon (const QString &level)
 Helper to get log level icon/color.
 

Private Attributes

db::EventsContainer * m_events = nullptr
 
QString m_filePath
 
std::vector< std::string > m_actorFields
 
std::size_t m_actorFieldsEventCount {0}
 
std::uint64_t m_actorFieldsGeneration {0}
 
QLabel * m_fileNameLabel = nullptr
 
QLabel * m_fileFormatLabel = nullptr
 
QLabel * m_fileSizeLabel = nullptr
 
QLabel * m_timeRangeLabel = nullptr
 
QLabel * m_testCaseTitleLabel = nullptr
 
QLabel * m_testCaseLabel = nullptr
 
QLabel * m_verdictTitleLabel = nullptr
 
QLabel * m_verdictLabel = nullptr
 
QLabel * m_totalEventsLabel = nullptr
 
QLabel * m_typeBreakdownTitleLabel = nullptr
 
QLabel * m_typeBreakdownLabel = nullptr
 
QLabel * m_topActorsLabel = nullptr
 
QPushButton * m_exportButton = nullptr
 
QPushButton * m_reportButton = nullptr
 
QPushButton * m_bookmarkButton = nullptr
 
QScrollArea * m_scrollArea = nullptr
 

Detailed Description

Dashboard panel showing log file overview and quick statistics.

Displays:

  • File info (name, format, size, time range; test case and verdict when the file header has them, see db::EventsContainer::GetFileMetadata())
  • Event statistics (total count, breakdown by the configured type filter field — config::GetConfig().typeFilterField, e.g. "level" — shown as whatever distinct values actually occur in that column, not a fixed ERROR/WARN/INFO/DEBUG vocabulary)
  • Top actors/services
  • Quick action buttons (Export, Report, Bookmark)

Updates automatically when events change.

Constructor & Destructor Documentation

◆ DashboardPanel()

ui::qt::DashboardPanel::DashboardPanel ( QWidget *  parent = nullptr)
explicit
Here is the call graph for this function:

◆ ~DashboardPanel()

ui::qt::DashboardPanel::~DashboardPanel ( )
default

Member Function Documentation

◆ BookmarkCurrentRequested

void ui::qt::DashboardPanel::BookmarkCurrentRequested ( )
signal
Here is the caller graph for this function:

◆ CreateLayout()

void ui::qt::DashboardPanel::CreateLayout ( )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ExportRequested

void ui::qt::DashboardPanel::ExportRequested ( )
signal
Here is the caller graph for this function:

◆ FormatNumber()

QString ui::qt::DashboardPanel::FormatNumber ( qint64  count)
staticprivate

Helper to format large numbers (1234567 → "1.2M")

Here is the caller graph for this function:

◆ GenerateReportRequested

void ui::qt::DashboardPanel::GenerateReportRequested ( )
signal
Here is the caller graph for this function:

◆ GetLevelIcon()

static QString ui::qt::DashboardPanel::GetLevelIcon ( const QString &  level)
staticprivate

Helper to get log level icon/color.

◆ OnBookmarkClicked

void ui::qt::DashboardPanel::OnBookmarkClicked ( )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ OnEventsChanged

void ui::qt::DashboardPanel::OnEventsChanged ( )
privateslot
Here is the call graph for this function:

◆ OnExportClicked

void ui::qt::DashboardPanel::OnExportClicked ( )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ OnReportClicked

void ui::qt::DashboardPanel::OnReportClicked ( )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ RecalculateStats()

void ui::qt::DashboardPanel::RecalculateStats ( )
inline

Force immediate recalculation of statistics.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Refresh()

void ui::qt::DashboardPanel::Refresh ( )
inline

Refresh dashboard (called from lazy refresh cycle)

Here is the call graph for this function:

◆ SetEventsSource()

void ui::qt::DashboardPanel::SetEventsSource ( db::EventsContainer *  events)

Set the events container to display stats for.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetFilePath()

void ui::qt::DashboardPanel::SetFilePath ( const QString &  path)

Path of the loaded log file (name, format, size and time range are shown for it).

◆ UpdateEventStats()

void ui::qt::DashboardPanel::UpdateEventStats ( )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ UpdateFileInfo()

void ui::qt::DashboardPanel::UpdateFileInfo ( )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ UpdateStats()

void ui::qt::DashboardPanel::UpdateStats ( )

Manually trigger stats update (called automatically on events change)

Here is the call graph for this function:
Here is the caller graph for this function:

◆ UpdateTopActors()

void ui::qt::DashboardPanel::UpdateTopActors ( )
private
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ m_actorFields

std::vector<std::string> ui::qt::DashboardPanel::m_actorFields
private

Actor columns found by discovery; re-discovered only when the log changes (size, or a clear / merge: container generation).

◆ m_actorFieldsEventCount

std::size_t ui::qt::DashboardPanel::m_actorFieldsEventCount {0}
private

◆ m_actorFieldsGeneration

std::uint64_t ui::qt::DashboardPanel::m_actorFieldsGeneration {0}
private

◆ m_bookmarkButton

QPushButton* ui::qt::DashboardPanel::m_bookmarkButton = nullptr
private

◆ m_events

db::EventsContainer* ui::qt::DashboardPanel::m_events = nullptr
private

◆ m_exportButton

QPushButton* ui::qt::DashboardPanel::m_exportButton = nullptr
private

◆ m_fileFormatLabel

QLabel* ui::qt::DashboardPanel::m_fileFormatLabel = nullptr
private

◆ m_fileNameLabel

QLabel* ui::qt::DashboardPanel::m_fileNameLabel = nullptr
private

◆ m_filePath

QString ui::qt::DashboardPanel::m_filePath
private

◆ m_fileSizeLabel

QLabel* ui::qt::DashboardPanel::m_fileSizeLabel = nullptr
private

◆ m_reportButton

QPushButton* ui::qt::DashboardPanel::m_reportButton = nullptr
private

◆ m_scrollArea

QScrollArea* ui::qt::DashboardPanel::m_scrollArea = nullptr
private

◆ m_testCaseLabel

QLabel* ui::qt::DashboardPanel::m_testCaseLabel = nullptr
private

◆ m_testCaseTitleLabel

QLabel* ui::qt::DashboardPanel::m_testCaseTitleLabel = nullptr
private

◆ m_timeRangeLabel

QLabel* ui::qt::DashboardPanel::m_timeRangeLabel = nullptr
private

◆ m_topActorsLabel

QLabel* ui::qt::DashboardPanel::m_topActorsLabel = nullptr
private

◆ m_totalEventsLabel

QLabel* ui::qt::DashboardPanel::m_totalEventsLabel = nullptr
private

◆ m_typeBreakdownLabel

QLabel* ui::qt::DashboardPanel::m_typeBreakdownLabel = nullptr
private

◆ m_typeBreakdownTitleLabel

QLabel* ui::qt::DashboardPanel::m_typeBreakdownTitleLabel = nullptr
private

◆ m_verdictLabel

QLabel* ui::qt::DashboardPanel::m_verdictLabel = nullptr
private

◆ m_verdictTitleLabel

QLabel* ui::qt::DashboardPanel::m_verdictTitleLabel = nullptr
private

The documentation for this class was generated from the following files: