Skip to content

Commit

Permalink
feat: add server name options to reports search panes and replace "_"…
Browse files Browse the repository at this point in the history
… with "default server"
  • Loading branch information
TheophileDiot committed Feb 12, 2025
1 parent cd88467 commit d5dbc09
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 2 deletions.
12 changes: 12 additions & 0 deletions src/ui/app/routes/reports.py
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,18 @@ def format_report(report):
"count": counts["count"],
}
)
elif field == "server_name":
search_panes_options["server_name"] = []
for name, counts in values.items():
display_name = "default server" if name == "_" else name
search_panes_options["server_name"].append(
{
"label": display_name,
"value": name,
"total": counts["total"],
"count": counts["count"],
}
)
else:
search_panes_options[field] = [
{
Expand Down
13 changes: 11 additions & 2 deletions src/ui/app/static/js/pages/reports.js
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,6 @@ $(document).ready(function () {
searchPanes: {
show: true,
combiner: "or",
// options: countriesSearchPanesOptions,
},
targets: 3,
render: function (data) {
Expand All @@ -431,9 +430,19 @@ $(document).ready(function () {
</span>`;
},
},
{
searchPanes: {
show: true,
combiner: "or",
},
targets: 9,
render: function (data) {
return data === "_" ? "default server" : data;
},
},
{
searchPanes: { show: true },
targets: [2, 4, 5, 6, 8, 9, 11],
targets: [2, 4, 5, 6, 8, 11],
},
],
order: [[1, "desc"]],
Expand Down

0 comments on commit d5dbc09

Please sign in to comment.