mirror of
https://github.com/portainer/portainer.git
synced 2025-08-01 20:05:23 +02:00
fix(registry-manager): add repositories pagination support (#2641)
* fix(registry-management): add support for repositories list with multiple requests * refactor(registry-management): change regex usage to a reusable interceptor function * refactor(registry-management): change interceptor to transformResponse function
This commit is contained in:
parent
90a0998502
commit
801336336f
3 changed files with 40 additions and 8 deletions
|
@ -0,0 +1,13 @@
|
|||
function linkGetResponse(data, headers) {
|
||||
var response = angular.fromJson(data);
|
||||
var link = headers('link');
|
||||
if (link) {
|
||||
var queryString = link.substring(link.indexOf('?') + 1).split('>;')[0];
|
||||
var queries = queryString.split('&');
|
||||
for (var i = 0; i < queries.length; i++) {
|
||||
var kv = queries[i].split('=');
|
||||
response[kv[0]] = kv[1];
|
||||
}
|
||||
}
|
||||
return response;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue