Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[19743] Status layout with problems per entity #204

Merged
merged 43 commits into from
Nov 20, 2023
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
5f8d281
Refs #19533: Add Status view to layout
JesusPoderoso Sep 18, 2023
423411f
Refs #19533: Improve disable view of chart layout button
JesusPoderoso Oct 25, 2023
df89f1f
Fix mock build issue
JesusPoderoso Oct 30, 2023
c162098
Fix visual details
JesusPoderoso Oct 30, 2023
56d54df
Display entity information when clicked in status layout
JesusPoderoso Oct 31, 2023
022ed1e
Refs #19533: Fix warning visual issue
JesusPoderoso Nov 2, 2023
00f073a
Refs #19533: Add filter to status layout properly
JesusPoderoso Nov 2, 2023
7a5fc14
Refs #19743: Fix topic filtering visual bugs
JesusPoderoso Nov 3, 2023
18e4069
Refs #19743: Add load model check for empty filter
JesusPoderoso Nov 7, 2023
15e9ae9
Refs #19743: [ARS] Set Backend status references
JesusPoderoso Nov 10, 2023
a50a7d5
Refs #19743: [ARS] Delete debug comment
JesusPoderoso Nov 10, 2023
6b2f4e4
Refs #19743: [ARS] Rename all problems to statuses
JesusPoderoso Nov 10, 2023
15a9ad6
Refs #19743: [ARS] Improve comments
JesusPoderoso Nov 10, 2023
2c3a635
Refs #19743: [ARS] Minor sugestions
JesusPoderoso Nov 10, 2023
0a21318
Refs #19743: [ARS] Improve entity status assignments
JesusPoderoso Nov 10, 2023
6c4a09a
Refs #19743: [ARS] Add missing problem sample 'Liveliness changed'
JesusPoderoso Nov 13, 2023
08ae1ac
Refs #19743: [ARS] Improve error / warning counter update and update …
JesusPoderoso Nov 13, 2023
9a69d19
Refs #19743: [ARS] Rename method
JesusPoderoso Nov 13, 2023
67699fb
Refs #19743: [ARS] QML minor changes
JesusPoderoso Nov 13, 2023
5b533f9
Refs #19743: [ARS] Improve graph connections section
JesusPoderoso Nov 13, 2023
1a105ea
Refs #19743: [ARS] Fix style in the imported qml files
JesusPoderoso Nov 13, 2023
ebcdc84
Refs #19743: [ARS] Remove unnecessary dead code
JesusPoderoso Nov 13, 2023
119401a
Refs #19743: [ARS] Remove unnecessary method
JesusPoderoso Nov 13, 2023
4095424
Refs #19743: [ARS] Refactor tree model filtering
JesusPoderoso Nov 13, 2023
5620d09
Refs #19743: [ARS] Remove info dead code
JesusPoderoso Nov 13, 2023
737cfc0
Refs #19743: [ARS] Improve StatusLayout.qml comments
JesusPoderoso Nov 13, 2023
f09da2b
Refs #19743: [ARS] Improve pointers deletion
JesusPoderoso Nov 13, 2023
70ef10a
Refs #19743: Refactor model roles to use direct get methods
JesusPoderoso Nov 13, 2023
0dd2396
Refs #19743: [ALRS] Rename 'copy' model method as 'filtered_copy'
JesusPoderoso Nov 14, 2023
1d1d043
Refs #19743: [ALRS] Remove repeated description in problems
JesusPoderoso Nov 14, 2023
1e19b6b
Refs #19743: [ALRS] Rename domain graph public property entity id as …
JesusPoderoso Nov 14, 2023
42e3846
Refs #19743: [ALRS] Improve status counter anchoring to avoid overlap…
JesusPoderoso Nov 14, 2023
eccba19
Refs #19743: [ALRS] Improve status sample kind usage
JesusPoderoso Nov 14, 2023
b54565e
Refs #19743: [ALRS] Treat entity status model status as StatusLevel i…
JesusPoderoso Nov 14, 2023
82f82ff
Refs #19743: [ALRS] Comment typo
JesusPoderoso Nov 14, 2023
ea8c0d2
Refs #19743: [ARS] Improve entity info update when new status reported
JesusPoderoso Nov 20, 2023
94d1e49
Refs #19743: [ARS] Remove unnecessary error check
JesusPoderoso Nov 20, 2023
a096479
Refs #19743: [ARS] Get Status Level string from sources (backend)
JesusPoderoso Nov 20, 2023
a292074
Refs #19743: [ARS] Fix visual bug with expand/collapse status layout …
JesusPoderoso Nov 20, 2023
83f858a
Refs #19743: [ARS] Fix timer flow
JesusPoderoso Nov 20, 2023
dbbd7ef
Refs #19743: [ARS] Add try-catch in get_status_data
JesusPoderoso Nov 20, 2023
69acbc9
Refs #19743: [ARS] Fix timer
JesusPoderoso Nov 20, 2023
3ace55c
Refs #19743: [ARS] Fix left panel focus
JesusPoderoso Nov 20, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions include/fastdds_monitor/backend/backend_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ using EntityId = eprosima::statistics_backend::EntityId;
using EntityKind = eprosima::statistics_backend::EntityKind;
using DataKind = eprosima::statistics_backend::DataKind;
using StatusKind = eprosima::statistics_backend::StatusKind;
using StatusLevel = eprosima::statistics_backend::StatusLevel;
using StatisticKind = eprosima::statistics_backend::StatisticKind;
using EntityInfo = eprosima::statistics_backend::Info;
using Timestamp = eprosima::statistics_backend::Timestamp;
Expand Down
4 changes: 4 additions & 0 deletions include/fastdds_monitor/backend/backend_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@ std::string statistic_kind_to_string(
std::string status_kind_to_string(
const StatusKind& status_kind);

//! Converts the \c StatusLevel to string
std::string status_level_to_string(
const StatusLevel& status_level);

//! Retrieves the \c EntityKind related with its name in QString
backend::EntityKind string_to_entity_kind(
const QString& entity_kind);
Expand Down
14 changes: 7 additions & 7 deletions include/fastdds_monitor/model/tree/StatusTreeItem.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,15 @@ class StatusTreeItem
explicit StatusTreeItem(
const backend::EntityId& id,
const std::string& name,
const bool& is_error,
const backend::StatusLevel& status_level,
const std::string& description);

//! Create an item with the status parameters
explicit StatusTreeItem(
const backend::EntityId& id,
const backend::StatusKind& kind,
const std::string& name,
const bool& is_error,
const backend::StatusLevel& status_level,
const std::string& value,
const std::string& description);

Expand Down Expand Up @@ -122,10 +122,10 @@ class StatusTreeItem

backend::StatusKind kind();

bool is_error();
backend::StatusLevel status_level();

void is_error(
bool val);
void status_level(
backend::StatusLevel val);

std::string name_str();

Expand Down Expand Up @@ -154,14 +154,14 @@ class StatusTreeItem
backend::EntityId id_;
backend::StatusKind kind_;
std::string name_;
bool is_status_error_;
backend::StatusLevel status_level_;
std::string value_;
std::string description_;
bool is_active_;
QVariant id_variant_;
QVariant kind_variant_;
QVariant name_variant_;
QVariant is_status_error_variant_;
QVariant status_level_variant_;
QVariant value_variant_;
QVariant description_variant_;
QVariant is_active_variant_;
Expand Down
4 changes: 2 additions & 2 deletions include/fastdds_monitor/model/tree/StatusTreeModel.h
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ class StatusTreeModel : public QAbstractItemModel
StatusTreeItem* getTopLevelItem(
const backend::EntityId& id,
const std::string& data,
const bool& is_error,
const backend::StatusLevel& status,
const std::string& description);

void set_source_model(
Expand All @@ -187,7 +187,7 @@ class StatusTreeModel : public QAbstractItemModel
StatusTreeItem* internalPointer(
const QModelIndex& index) const;

StatusTreeItem* copy(
StatusTreeItem* filtered_copy(
StatusTreeItem* source,
const backend::EntityId entity_id);

Expand Down
20 changes: 10 additions & 10 deletions qml/DomainGraphLayout.qml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Item

// Public properties
property var model: {} // domain view graph JSON model
property int entity_id // entity id associated to the domain id
property int domain_entity_id // entity id associated to the domain id
property int domain_id // domain id
required property string component_id // mandatory to be included when object created

Expand Down Expand Up @@ -237,7 +237,7 @@ Item
onClicked:
{
if(mouse.button & Qt.RightButton) {
openTopicMenu(entity_id, domain_id, modelData["id"], modelData["alias"], modelData["kind"])
openTopicMenu(domain_entity_id, domain_id, modelData["id"], modelData["alias"], modelData["kind"])
} else {
controller.topic_click(modelData["id"])
}
Expand Down Expand Up @@ -573,7 +573,7 @@ Item
onClicked:
{
if(mouse.button & Qt.RightButton) {
openEntitiesMenu(entity_id, modelData["id"], modelData["alias"], modelData["kind"])
openEntitiesMenu(domain_entity_id, modelData["id"], modelData["alias"], modelData["kind"])
} else {
controller.host_click(modelData["id"])
}
Expand Down Expand Up @@ -717,7 +717,7 @@ Item
onClicked:
{
if(mouse.button & Qt.RightButton) {
openEntitiesMenu(entity_id, modelData["id"], modelData["alias"], modelData["kind"])
openEntitiesMenu(domain_entity_id, modelData["id"], modelData["alias"], modelData["kind"])
} else {
controller.user_click(modelData["id"])
}
Expand Down Expand Up @@ -860,7 +860,7 @@ Item
onClicked:
{
if(mouse.button & Qt.RightButton) {
openEntitiesMenu(entity_id, modelData["id"], modelData["alias"], modelData["kind"])
openEntitiesMenu(domain_entity_id, modelData["id"], modelData["alias"], modelData["kind"])
} else {
controller.process_click(modelData["id"])
}
Expand Down Expand Up @@ -1001,7 +1001,7 @@ Item
onClicked:
{
if(mouse.button & Qt.RightButton) {
openEntitiesMenu(entity_id, modelData["id"], modelData["alias"], modelData["kind"])
openEntitiesMenu(domain_entity_id, modelData["id"], modelData["alias"], modelData["kind"])
} else {
controller.participant_click(modelData["id"])
}
Expand Down Expand Up @@ -1198,7 +1198,7 @@ Item
onClicked:
{
if(mouse.button & Qt.RightButton) {
openEntitiesMenu(entity_id, modelData["id"], modelData["alias"], modelData["kind"])
openEntitiesMenu(domain_entity_id, modelData["id"], modelData["alias"], modelData["kind"])
} else {
controller.endpoint_click(modelData["id"])
}
Expand Down Expand Up @@ -1333,7 +1333,7 @@ Item
clear_graph()

// Obtain model from backend
var model_string = controller.get_domain_view_graph(entity_id)
var model_string = controller.get_domain_view_graph(domain_entity_id)

// declare obtained hosts and topics variables
var new_topics = []
Expand Down Expand Up @@ -1616,15 +1616,15 @@ Item
if (domainEntityId != "")
{
// belongs to the current domain
if (entity_id.toString() != domainEntityId)
if (domain_entity_id.toString() != domainEntityId)
{
return false
}
}
// check all entities by entityId

// check domain
if(entity_id.toString() == entityId)
if(domain_entity_id.toString() == entityId)
{
return true
}
Expand Down
2 changes: 1 addition & 1 deletion qml/GraphConnection.qml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Item {
color: "white"
}

//background to make connection overlap nicely left panel
// background to make connection overlap nicely left panel
Rectangle {
id: left_background
anchors.top: parent.top; anchors.bottom: parent.bottom
Expand Down
4 changes: 2 additions & 2 deletions qml/StatusLayout.qml
Original file line number Diff line number Diff line change
Expand Up @@ -277,8 +277,8 @@ Item
}
IconSVG {
id: warning_icon
anchors.left: error_icon.right
anchors.leftMargin: elements_spacing_ * 4
anchors.left: error_value.right
anchors.leftMargin: elements_spacing_
anchors.verticalCenter: parent.verticalCenter
name: "issues"
size: parent.height - elements_spacing_
Expand Down
6 changes: 4 additions & 2 deletions qml/StatusTreeViewItem.qml
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,12 @@ Item {
IconSVG {
id: status_icon
visible: !(currentRow.currentId === "all" && currentRow.currentKind === "INVALID")
&& currentRow.currentStatus != "OK"
anchors.left: parent.left; anchors.leftMargin: -5
anchors.verticalCenter: parent.verticalCenter
name: currentRow.currentStatus ? "error" :"issues"
color: currentRow.currentAlive ? currentRow.currentStatus ? "red" :"black" : "grey"
name: currentRow.currentStatus == "ERROR" ? "error"
: currentRow.currentStatus == "WARNING" ? "issues" : ""
color: currentRow.currentAlive ? currentRow.currentStatus == "ERROR" ? "red" :"black" : "grey"
size: 15
}

Expand Down
14 changes: 7 additions & 7 deletions qml/TabLayout.qml
Original file line number Diff line number Diff line change
Expand Up @@ -223,9 +223,9 @@ Item {
for (var j=0; j<stack_layout.count; j++)
{
if (stack_layout.children[j].stack_id == tabLayout.tab_model_[i]["stack_id"] &&
stack_layout.children[j].currentItem.entity_id > 0)
stack_layout.children[j].currentItem.domain_entity_id > 0)
{
controller.domain_click(stack_layout.children[j].currentItem.entity_id)
controller.domain_click(stack_layout.children[j].currentItem.domain_entity_id)
break;
}
}
Expand All @@ -247,15 +247,15 @@ Item {
function onInitialize_domain_view_(stack_id, entity_id, domain_id) {
if (domainGraphLayout.component_id == stack_id)
{
domainGraphLayout.entity_id = entity_id
domainGraphLayout.domain_entity_id = entity_id
domainGraphLayout.domain_id = domain_id
domainGraphLayout.load_model()
}
}

function onFilter_domain_view_by_topic_(stack_id, domain_entity_id, topic_id) {
if (domainGraphLayout.component_id == stack_id &&
domainGraphLayout.entity_id == domain_entity_id)
domainGraphLayout.domain_entity_id == domain_entity_id)
{
domainGraphLayout.filter_model_by_topic(topic_id)
}
Expand Down Expand Up @@ -507,9 +507,9 @@ Item {
for (var i=0; i<stack_layout.count; i++)
{
if (stack_layout.children[i].stack_id == tabLayout.tab_model_[idx]["stack_id"] &&
stack_layout.children[i].currentItem.entity_id > 0)
stack_layout.children[i].currentItem.domain_entity_id > 0)
{
controller.domain_click(stack_layout.children[i].currentItem.entity_id)
controller.domain_click(stack_layout.children[i].currentItem.domain_entity_id)
break;
}
}
Expand Down Expand Up @@ -634,7 +634,7 @@ Item {
function refresh_domain_graph_view(domainEntityId, entityId) {
for (var i=0; i<stack_layout.count; i++)
{
if (stack_layout.children[i].currentItem.entity_id != undefined)
if (stack_layout.children[i].currentItem.domain_entity_id != undefined)
{
if (stack_layout.children[i].currentItem.contains_entity(domainEntityId, entityId))
{
Expand Down
Loading