mirror of
https://github.com/lucky-sideburn/kubeinvaders.git
synced 2026-08-23 21:46:21 +00:00
fix empty node list
This commit is contained in:
@@ -123,7 +123,11 @@ function getPods(){
|
||||
var oReq = new XMLHttpRequest();
|
||||
oReq.onload = function () {
|
||||
json_parsed = JSON.parse(this.responseText)
|
||||
pods = json_parsed["items"].concat(nodes);
|
||||
if (nodes && nodes.length > 0){
|
||||
pods = json_parsed["items"].concat(nodes);
|
||||
} else {
|
||||
pods = json_parsed["items"];
|
||||
}
|
||||
};;
|
||||
oReq.open("GET", "https://ENDPOINT_PLACEHOLDER/kube/pods?action=list&namespace=" + namespace);
|
||||
oReq.send();
|
||||
|
||||
Reference in New Issue
Block a user