API: Fix pagination issue with listing LDAP configuration - #11444
API: Fix pagination issue with listing LDAP configuration#11444Pearl1594 wants to merge 2 commits into
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## 4.20 #11444 +/- ##
============================================
- Coverage 16.26% 16.26% -0.01%
- Complexity 13434 13435 +1
============================================
Files 5667 5667
Lines 500731 500732 +1
Branches 60803 60803
============================================
- Hits 81455 81452 -3
- Misses 410172 410175 +3
- Partials 9104 9105 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
@pearl, It does not seem to work, I think we must consider the option ro add a uuid to the API/records |
|
Seemed to be a UI issue. It works via cmk. Thanks for testing @DaanHoogland |
|
| :columns="isOrderUpdatable() ? columns : columns.filter(x => x.dataIndex !== 'order')" | ||
| :dataSource="items" | ||
| :rowKey="(record, idx) => record.id || record.name || record.usageType || idx + '-' + Math.random()" | ||
| :rowKey="(record, idx) => hasNoUniqueKey() ? (idx + '-' + Math.random()) : (record.id || record.name || record.usageType || idx + '-' + Math.random())" |
There was a problem hiding this comment.
how about making the key/id be the concatenation of hostnam+”-“+port+”-“+domainid?
There was a problem hiding this comment.
good point @DaanHoogland
also, can we create a method for this ? @Pearl1594
There was a problem hiding this comment.
Does ldap configuration returns any of id, name or usagetype? Won't it automatically fallback to idx + '-' + Math.random()
On qa server, I was getting,
(qaserver) 🐱 > list ldapconfigurations
{
"LdapConfiguration": [
{
"hostname": "ldap.forumsys.com",
"port": 389
}
],
"count": 1
}
|
@Pearl1594 , the pagination works but no it reveals new issues, sorting does not work beyond the page we are looking at. I do not consider this a big issues as most installations will not have enormous amounts of ldap configurations, but still it seems like a(nother) justifications for giving ldapconfigurations a proper uuid. That said, lgtm. |
| :columns="isOrderUpdatable() ? columns : columns.filter(x => x.dataIndex !== 'order')" | ||
| :dataSource="items" | ||
| :rowKey="(record, idx) => record.id || record.name || record.usageType || idx + '-' + Math.random()" | ||
| :rowKey="(record, idx) => hasNoUniqueKey() ? (idx + '-' + Math.random()) : (record.id || record.name || record.usageType || idx + '-' + Math.random())" |
There was a problem hiding this comment.
good point @DaanHoogland
also, can we create a method for this ? @Pearl1594
41b92dd to
6f432d1
Compare
|
shwstppr
left a comment
There was a problem hiding this comment.
code lgtm
@Pearl1594 can you please check the outstanding comment?
| :columns="isOrderUpdatable() ? columns : columns.filter(x => x.dataIndex !== 'order')" | ||
| :dataSource="items" | ||
| :rowKey="(record, idx) => record.id || record.name || record.usageType || idx + '-' + Math.random()" | ||
| :rowKey="(record, idx) => hasNoUniqueKey() ? (idx + '-' + Math.random()) : (record.id || record.name || record.usageType || idx + '-' + Math.random())" |
There was a problem hiding this comment.
Does ldap configuration returns any of id, name or usagetype? Won't it automatically fallback to idx + '-' + Math.random()
On qa server, I was getting,
(qaserver) 🐱 > list ldapconfigurations
{
"LdapConfiguration": [
{
"hostname": "ldap.forumsys.com",
"port": 389
}
],
"count": 1
}
6f432d1 to
57f1529
Compare
|
@blueorangutan package |
|
@DaanHoogland a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 18756 |
|
@Pearl1594 , do you need to do more work on this (draft) PR? |
|
@blueorangutan test |
|
@DaanHoogland a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
|
[SF] Trillian test result (tid-16697)
|



Description
This PR fixes issue with pagination when listing ldap configuration. When there are more than 20 entries and we want to list the 2nd page of ldap configs when using page size 20 , it returns the 1st 20 entries always.
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
How did you try to break this feature and the system with this change?