-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add OS info to LXD pods in pod list. #1061
Conversation
dcfafd2
to
be90440
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, a few small suggestions for your consideration.
return items.find(item => item.id === itemId).name; | ||
$scope.getOSInfo = (pod) => { | ||
const podHost = $scope.hostMap.get(pod.id); | ||
if (podHost) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be nice to move this host parsing code to a reusable function somewhere that takes osystem
, distro_series
and releases
as arguments? Imagine we'll want to use this when we rebuild this view in react.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea. I've separated out a function that takes node
and osInfo
as arguments, where osInfo
is the data returned from the general.osinfo
websocket handler.
Come to think of it we probably already have a function in the react codebase that handles this, because we need it for the Status column in the machine list.
|
||
return items.find(item => item.id === itemId).name; | ||
$scope.getOSInfo = (pod) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This name seems a bit misleading, as we get
osinfo (which is a complex object) on l70, when this is really returning an "OS shortname" or something along those lines.
be90440
to
efa9e46
Compare
Done
QA
Fixes
Fixes #1003
Screenshot