mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2026-07-26 07:28:39 -04:00
BE+FE: change log
This commit is contained in:
@@ -131,6 +131,7 @@ class Query(ObjectType):
|
||||
devGUID=devGUID,
|
||||
changedColumn=changedColumn,
|
||||
changedBy=changedBy,
|
||||
search=paging["search"]
|
||||
)
|
||||
else:
|
||||
groups = h.get_all_grouped_history(
|
||||
@@ -145,6 +146,7 @@ class Query(ObjectType):
|
||||
total = h.get_total_group_count(
|
||||
changedColumn=changedColumn,
|
||||
changedBy=changedBy,
|
||||
search=paging["search"]
|
||||
)
|
||||
|
||||
return DeviceHistoryResult(
|
||||
|
||||
@@ -115,12 +115,12 @@ class DevicesHistoryInstance:
|
||||
"changedColumn": [r["changedColumn"] for r in col_rows],
|
||||
}
|
||||
|
||||
def get_total_group_count(self, devGUID=None, changedColumn=None, changedBy=None):
|
||||
def get_total_group_count(self, devGUID=None, changedColumn=None, changedBy=None, search=None):
|
||||
"""
|
||||
Return the total number of distinct change-event groups matching the
|
||||
given filters. Used by the frontend to calculate total pages.
|
||||
"""
|
||||
clauses, params = self._build_clauses(devGUID, changedColumn, changedBy)
|
||||
clauses, params = self._build_clauses(devGUID, changedColumn, changedBy, search)
|
||||
where = f"WHERE {' AND '.join(clauses)}" if clauses else ""
|
||||
|
||||
rows = self._fetchall(
|
||||
|
||||
Reference in New Issue
Block a user