Merge pull request #2042 from safing/fix/2041-UI-crash-loading-grouped-connections
fix: UI bug: when loading grouped connections from 'future'
This commit is contained in:
@@ -586,15 +586,17 @@ export class SfngNetqueryViewer implements OnInit, OnDestroy, AfterViewInit {
|
|||||||
// the the correct resulsts here which depend on whether or not
|
// the the correct resulsts here which depend on whether or not
|
||||||
// we're applying a group by.
|
// we're applying a group by.
|
||||||
let totalCount = 0;
|
let totalCount = 0;
|
||||||
if (this.groupByKeys.length === 0) {
|
if (response?.totalCount) {
|
||||||
totalCount = response.totalCount[0].totalCount;
|
if (this.groupByKeys.length === 0 ) {
|
||||||
} else {
|
totalCount = response.totalCount[0].totalCount;
|
||||||
totalCount = response.totalCount.length;
|
} else {
|
||||||
|
totalCount = response.totalCount.length;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
totalCount,
|
totalCount,
|
||||||
totalConnCount: response.totalConnCount,
|
totalConnCount: response?.totalConnCount || [],
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
),
|
),
|
||||||
@@ -633,7 +635,7 @@ export class SfngNetqueryViewer implements OnInit, OnDestroy, AfterViewInit {
|
|||||||
// reset the paginator with the new total result count and
|
// reset the paginator with the new total result count and
|
||||||
// open the first page.
|
// open the first page.
|
||||||
this.paginator.reset(result.response.totalCount);
|
this.paginator.reset(result.response.totalCount);
|
||||||
this.totalConnCount = result.response.totalConnCount[0].totalConnCount;
|
this.totalConnCount = result.response?.totalConnCount[0]?.totalConnCount || 0;
|
||||||
this.totalResultCount = result.response.totalCount;
|
this.totalResultCount = result.response.totalCount;
|
||||||
|
|
||||||
// update the current URL to include the new search
|
// update the current URL to include the new search
|
||||||
|
|||||||
Reference in New Issue
Block a user