From 9d803f4267e44c455a23795047cceb0cfa4b4579 Mon Sep 17 00:00:00 2001 From: smile13 Date: Fri, 15 May 2020 13:18:30 +0300 Subject: [PATCH 1/2] Fix DOM ddash --- services/web/apps/pm/ddash/dashboards/mo.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/services/web/apps/pm/ddash/dashboards/mo.py b/services/web/apps/pm/ddash/dashboards/mo.py index 9d855f70a0..c12f198106 100644 --- a/services/web/apps/pm/ddash/dashboards/mo.py +++ b/services/web/apps/pm/ddash/dashboards/mo.py @@ -135,6 +135,7 @@ class MODashboard(BaseDashboard): "status": iface.status, "metrics": interface_dom_metrics(profile), "type": profile.id, + "profile_name": profile.name } ] if iface.type == "physical": @@ -164,7 +165,7 @@ class MODashboard(BaseDashboard): if radio: radio_types += [{"type": profile.id, "name": profile.name, "ports": radio}] if dom: - dom_types = dom + dom_types += dom if self.object.object_profile.report_ping_rtt: object_metrics += ["rtt"] @@ -190,7 +191,7 @@ class MODashboard(BaseDashboard): "lags": lags, "subifaces": subif, "radio_types": radio_types, - "dom_types": dom_types, + "dom_types": sorted(dom_types, key=lambda x: alnum_key(x["name"])) } def render(self): -- GitLab From b93b8e4857c83bdcaddc6a0db26d1270af5da767 Mon Sep 17 00:00:00 2001 From: smile13 Date: Fri, 15 May 2020 13:22:52 +0300 Subject: [PATCH 2/2] fix black --- services/web/apps/pm/ddash/dashboards/mo.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/web/apps/pm/ddash/dashboards/mo.py b/services/web/apps/pm/ddash/dashboards/mo.py index c12f198106..8a4e41e961 100644 --- a/services/web/apps/pm/ddash/dashboards/mo.py +++ b/services/web/apps/pm/ddash/dashboards/mo.py @@ -135,7 +135,7 @@ class MODashboard(BaseDashboard): "status": iface.status, "metrics": interface_dom_metrics(profile), "type": profile.id, - "profile_name": profile.name + "profile_name": profile.name, } ] if iface.type == "physical": @@ -191,7 +191,7 @@ class MODashboard(BaseDashboard): "lags": lags, "subifaces": subif, "radio_types": radio_types, - "dom_types": sorted(dom_types, key=lambda x: alnum_key(x["name"])) + "dom_types": sorted(dom_types, key=lambda x: alnum_key(x["name"])), } def render(self): -- GitLab