-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Handle k8s edge cases in the web console overview. #1028
Conversation
Couple things to note:
|
is there any way to capture the API responses to LIST * you used to build this, and save them as fixtures to trigger somehow? |
I already opened a separate PR with just the fixtures #1031 |
ah, great |
Hrm... "there is no service for these pods" (beyond being bad english) seems misplaced. We may want to tell the user why we grouped them, but not imply that the grouping is a service. |
to hide our build pods from these view. Or we need to actually reap old build pods. | ||
Also hide deployer pods. | ||
--> | ||
<section ng-repeat="(podName, pod) in solitaryPods" ng-if="pod.status.phase != 'Succeeded' && pod.status.phase != 'Terminated' && !buildPods[podName] && !(pod | annotation : 'deployment')"> |
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.
Move this logic into the controller method? If you want to keep track of all solitaryPods, as well as the filtered ones we're going to display, you could have unfilteredSolitaryPods
and solitaryPods
in the controller, then have the view just render solitaryPods
.
fb3901b
to
33354c6
Compare
$scope.deploymentPods[name] = ls.select($scope.pods); | ||
}); | ||
|
||
console.log("podsByServiceByLabel", $scope.podsByServiceByLabel); |
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.
copy/paste
Output of rename brainstorm:
|
@@ -58,6 +71,99 @@ angular.module('openshiftConsole') | |||
console.log("podsByServiceByLabel", $scope.podsByServiceByLabel); | |||
}; | |||
|
|||
var podRelationships = function() { |
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.
building all the pod maps in one function (podsByDeployment, podsByService, monopodsByService) would let us avoid building and evaluating the same label selectors on the same pods repeatedly
9f66d55
to
641d1c2
Compare
// Not using angular.forEach so that we can break out early | ||
for (var i = 0; !isInDepInSvc && i < deployments.length; i++) { | ||
var depName = deployments[i]; | ||
if ($scope.deploymentsByService[svcName][depName]) { |
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.
any chance $scope.deploymentsByService[svcName]
could be undefined?
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.
yes it can actually
LGTM, squash, update screenshots, update bindata |
76966ed
to
4912608
Compare
[merge] |
continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/merge_pull_requests_openshift3/961/) (Image: devenv-fedora_831) |
Evaluated for origin up to 4912608 |
Merged by openshift-bot
No description provided.