store/cockpitApi: blueprint links
Use the filename/id of the blueprints as the links to the first and last element for the blueprint list metadata. These links are a little meaningless since they should be urls.
This commit is contained in:
parent
6bc791a379
commit
ad239b9b6c
1 changed files with 12 additions and 3 deletions
|
|
@ -92,13 +92,22 @@ export const cockpitApi = emptyCockpitApi.injectEndpoints({
|
|||
return true;
|
||||
});
|
||||
|
||||
let first = '';
|
||||
let last = '';
|
||||
|
||||
if (blueprints.length > 0) {
|
||||
first = blueprints[0].id;
|
||||
last = blueprints[blueprints.length - 1].id;
|
||||
}
|
||||
|
||||
return {
|
||||
data: {
|
||||
meta: { count: blueprints.length },
|
||||
links: {
|
||||
// TODO: figure out the pagination
|
||||
first: '',
|
||||
last: '',
|
||||
// These are kind of meaningless for the on-prem
|
||||
// version
|
||||
first: first,
|
||||
last: last,
|
||||
},
|
||||
data: blueprints,
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue