Skip to content

Commit

Permalink
Makes it so an empty state query blocks and changes the style to be m…
Browse files Browse the repository at this point in the history
…ore Nomadic (#20588)
  • Loading branch information
philrenaud authored May 15, 2024
1 parent 1cc99cc commit 6886edf
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
7 changes: 6 additions & 1 deletion ui/app/adapters/job.js
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,12 @@ export default class JobAdapter extends WatchableNamespaceIDs {
result.meta.nextToken = headers['x-nomad-nexttoken'];
}
if (headers['x-nomad-index']) {
result.meta.index = headers['x-nomad-index'];
// Query won't block if the index is 0 (see also watch-list.getIndexFor for prior art)
if (headers['x-nomad-index'] === '0') {
result.meta.index = 1;
} else {
result.meta.index = headers['x-nomad-index'];
}
}
}
return result;
Expand Down
7 changes: 6 additions & 1 deletion ui/app/styles/components/empty-message.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
* SPDX-License-Identifier: BUSL-1.1
*/

.empty-message {
.empty-message,
.hds-application-state {
padding: 1.5rem;
background: $white-ter;
border-radius: $radius;
Expand Down Expand Up @@ -48,3 +49,7 @@
}
}
}

.section .hds-application-state {
width: 100%;
}

0 comments on commit 6886edf

Please sign in to comment.