{"action":"created","comment":{"url":"https://api.github.com/repos/kubernetes/dashboard/pulls/comments/51539250","id":51539250,"diff_hunk":"@@ -100,3 +114,77 @@ func getReplicaSetPodInfo(replicaSet *api.ReplicationController, pods []api.Pod)\n \n \treturn result\n }\n+\n+// Returns Pod Events of type warning from given list of pods\n+// TODO(floreks) : use some set to get only unique error messages\n+func GetPodsEventWarnings(client *client.Client, pods []api.Pod) (result []PodEvent, err error) {\n+\tfor _, pod := range pods {\n+\t\tif !isRunningOrSucceeded(pod) {\n+\t\t\tlog.Printf(\"Getting warning events from pod: %s\", pod.Name)\n+\t\t\tevents, err := GetPodEvents(client, pod)\n+\n+\t\t\tif err != nil {\n+\t\t\t\treturn nil, err\n+\t\t\t}\n+\n+\t\t\tresult = getPodsEventWarnings(events)\n+\t\t}\n+\t}\n+\n+\treturn removeDuplicates(result), nil\n+}\n+\n+// Filters kubernetes API event objects based on event type. Empty string will return all events\n+func FilterEventsByType(events []api.Event, eventType string) []api.Event {","path":"src/app/backend/replicasetcommon.go","position":53,"original_position":53,"commit_id":"847c450b712ef28c47e15816ae25e998986e4e87","original_commit_id":"847c450b712ef28c47e15816ae25e998986e4e87","user":{"login":"floreks","id":2285385,"avatar_url":"https://avatars.githubusercontent.com/u/2285385?v=3","gravatar_id":"","url":"https://api.github.com/users/floreks","html_url":"https://github.com/floreks","followers_url":"https://api.github.com/users/floreks/followers","following_url":"https://api.github.com/users/floreks/following{/other_user}","gists_url":"https://api.github.com/users/floreks/gists{/gist_id}","starred_url":"https://api.github.com/users/floreks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/floreks/subscriptions","organizations_url":"https://api.github.com/users/floreks/orgs","repos_url":"https://api.github.com/users/floreks/repos","events_url":"https://api.github.com/users/floreks/events{/privacy}","received_events_url":"https://api.github.com/users/floreks/received_events","type":"User","site_admin":false},"body":"Should it be public?","created_at":"2016-02-02T08:49:31Z","updated_at":"2016-02-02T08:49:31Z","html_url":"https://github.com/kubernetes/dashboard/pull/319#discussion_r51539250","pull_request_url":"https://api.github.com/repos/kubernetes/dashboard/pulls/319","_links":{"self":{"href":"https://api.github.com/repos/kubernetes/dashboard/pulls/comments/51539250"},"html":{"href":"https://github.com/kubernetes/dashboard/pull/319#discussion_r51539250"},"pull_request":{"href":"https://api.github.com/repos/kubernetes/dashboard/pulls/319"}}},"pull_request":{"url":"https://api.github.com/repos/kubernetes/dashboard/pulls/319","id":57836994,"html_url":"https://github.com/kubernetes/dashboard/pull/319","diff_url":"https://github.com/kubernetes/dashboard/pull/319.diff","patch_url":"https://github.com/kubernetes/dashboard/pull/319.patch","issue_url":"https://api.github.com/repos/kubernetes/dashboard/issues/319","number":319,"state":"open","locked":false,"title":"Added replica set card status messages","user":{"login":"floreks","id":2285385,"avatar_url":"https://avatars.githubusercontent.com/u/2285385?v=3","gravatar_id":"","url":"https://api.github.com/users/floreks","html_url":"https://github.com/floreks","followers_url":"https://api.github.com/users/floreks/followers","following_url":"https://api.github.com/users/floreks/following{/other_user}","gists_url":"https://api.github.com/users/floreks/gists{/gist_id}","starred_url":"https://api.github.com/users/floreks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/floreks/subscriptions","organizations_url":"https://api.github.com/users/floreks/orgs","repos_url":"https://api.github.com/users/floreks/repos","events_url":"https://api.github.com/users/floreks/events{/privacy}","received_events_url":"https://api.github.com/users/floreks/received_events","type":"User","site_admin":false},"body":"This is the current look of the card status. I've also done some refactoring during backend implementation.\r\n\r\nI've had a problem with cluster started with `gulp local-up-cluster`. Events returned by it has empty `Type` property. No idea why. It works fine on my local cluster started from kubernetes repo fork.\r\n\r\n![zrzut ekranu z 2016-02-01 14-03-33](https://cloud.githubusercontent.com/assets/2285385/12718118/93cc5706-c8ec-11e5-9e25-688e4d9b14cc.png)\r\n\r\n**Important**: Need help in finding `Pending` icon. :)\r\n\r\n@maciaszczykm @bryk PTAL","created_at":"2016-02-01T13:07:24Z","updated_at":"2016-02-02T08:49:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ced1946e379a4759d0134d1b01a383af13c9030a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/kubernetes/dashboard/pulls/319/commits","review_comments_url":"https://api.github.com/repos/kubernetes/dashboard/pulls/319/comments","review_comment_url":"https://api.github.com/repos/kubernetes/dashboard/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kubernetes/dashboard/issues/319/comments","statuses_url":"https://api.github.com/repos/kubernetes/dashboard/statuses/847c450b712ef28c47e15816ae25e998986e4e87","head":{"label":"floreks:card-status","ref":"card-status","sha":"847c450b712ef28c47e15816ae25e998986e4e87","user":{"login":"floreks","id":2285385,"avatar_url":"https://avatars.githubusercontent.com/u/2285385?v=3","gravatar_id":"","url":"https://api.github.com/users/floreks","html_url":"https://github.com/floreks","followers_url":"https://api.github.com/users/floreks/followers","following_url":"https://api.github.com/users/floreks/following{/other_user}","gists_url":"https://api.github.com/users/floreks/gists{/gist_id}","starred_url":"https://api.github.com/users/floreks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/floreks/subscriptions","organizations_url":"https://api.github.com/users/floreks/orgs","repos_url":"https://api.github.com/users/floreks/repos","events_url":"https://api.github.com/users/floreks/events{/privacy}","received_events_url":"https://api.github.com/users/floreks/received_events","type":"User","site_admin":false},"repo":{"id":45398177,"name":"dashboard","full_name":"floreks/dashboard","owner":{"login":"floreks","id":2285385,"avatar_url":"https://avatars.githubusercontent.com/u/2285385?v=3","gravatar_id":"","url":"https://api.github.com/users/floreks","html_url":"https://github.com/floreks","followers_url":"https://api.github.com/users/floreks/followers","following_url":"https://api.github.com/users/floreks/following{/other_user}","gists_url":"https://api.github.com/users/floreks/gists{/gist_id}","starred_url":"https://api.github.com/users/floreks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/floreks/subscriptions","organizations_url":"https://api.github.com/users/floreks/orgs","repos_url":"https://api.github.com/users/floreks/repos","events_url":"https://api.github.com/users/floreks/events{/privacy}","received_events_url":"https://api.github.com/users/floreks/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/floreks/dashboard","description":"","fork":true,"url":"https://api.github.com/repos/floreks/dashboard","forks_url":"https://api.github.com/repos/floreks/dashboard/forks","keys_url":"https://api.github.com/repos/floreks/dashboard/keys{/key_id}","collaborators_url":"https://api.github.com/repos/floreks/dashboard/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/floreks/dashboard/teams","hooks_url":"https://api.github.com/repos/floreks/dashboard/hooks","issue_events_url":"https://api.github.com/repos/floreks/dashboard/issues/events{/number}","events_url":"https://api.github.com/repos/floreks/dashboard/events","assignees_url":"https://api.github.com/repos/floreks/dashboard/assignees{/user}","branches_url":"https://api.github.com/repos/floreks/dashboard/branches{/branch}","tags_url":"https://api.github.com/repos/floreks/dashboard/tags","blobs_url":"https://api.github.com/repos/floreks/dashboard/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/floreks/dashboard/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/floreks/dashboard/git/refs{/sha}","trees_url":"https://api.github.com/repos/floreks/dashboard/git/trees{/sha}","statuses_url":"https://api.github.com/repos/floreks/dashboard/statuses/{sha}","languages_url":"https://api.github.com/repos/floreks/dashboard/languages","stargazers_url":"https://api.github.com/repos/floreks/dashboard/stargazers","contributors_url":"https://api.github.com/repos/floreks/dashboard/contributors","subscribers_url":"https://api.github.com/repos/floreks/dashboard/subscribers","subscription_url":"https://api.github.com/repos/floreks/dashboard/subscription","commits_url":"https://api.github.com/repos/floreks/dashboard/commits{/sha}","git_commits_url":"https://api.github.com/repos/floreks/dashboard/git/commits{/sha}","comments_url":"https://api.github.com/repos/floreks/dashboard/comments{/number}","issue_comment_url":"https://api.github.com/repos/floreks/dashboard/issues/comments{/number}","contents_url":"https://api.github.com/repos/floreks/dashboard/contents/{+path}","compare_url":"https://api.github.com/repos/floreks/dashboard/compare/{base}...{head}","merges_url":"https://api.github.com/repos/floreks/dashboard/merges","archive_url":"https://api.github.com/repos/floreks/dashboard/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/floreks/dashboard/downloads","issues_url":"https://api.github.com/repos/floreks/dashboard/issues{/number}","pulls_url":"https://api.github.com/repos/floreks/dashboard/pulls{/number}","milestones_url":"https://api.github.com/repos/floreks/dashboard/milestones{/number}","notifications_url":"https://api.github.com/repos/floreks/dashboard/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/floreks/dashboard/labels{/name}","releases_url":"https://api.github.com/repos/floreks/dashboard/releases{/id}","deployments_url":"https://api.github.com/repos/floreks/dashboard/deployments","created_at":"2015-11-02T14:06:15Z","updated_at":"2016-01-11T08:41:41Z","pushed_at":"2016-02-02T08:46:45Z","git_url":"git://github.com/floreks/dashboard.git","ssh_url":"git@github.com:floreks/dashboard.git","clone_url":"https://github.com/floreks/dashboard.git","svn_url":"https://github.com/floreks/dashboard","homepage":"","size":43445,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"kubernetes:master","ref":"master","sha":"ec91b7a54cae8ffa975578994bc293fb7cb028a9","user":{"login":"kubernetes","id":13629408,"avatar_url":"https://avatars.githubusercontent.com/u/13629408?v=3","gravatar_id":"","url":"https://api.github.com/users/kubernetes","html_url":"https://github.com/kubernetes","followers_url":"https://api.github.com/users/kubernetes/followers","following_url":"https://api.github.com/users/kubernetes/following{/other_user}","gists_url":"https://api.github.com/users/kubernetes/gists{/gist_id}","starred_url":"https://api.github.com/users/kubernetes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubernetes/subscriptions","organizations_url":"https://api.github.com/users/kubernetes/orgs","repos_url":"https://api.github.com/users/kubernetes/repos","events_url":"https://api.github.com/users/kubernetes/events{/privacy}","received_events_url":"https://api.github.com/users/kubernetes/received_events","type":"Organization","site_admin":false},"repo":{"id":44350607,"name":"dashboard","full_name":"kubernetes/dashboard","owner":{"login":"kubernetes","id":13629408,"avatar_url":"https://avatars.githubusercontent.com/u/13629408?v=3","gravatar_id":"","url":"https://api.github.com/users/kubernetes","html_url":"https://github.com/kubernetes","followers_url":"https://api.github.com/users/kubernetes/followers","following_url":"https://api.github.com/users/kubernetes/following{/other_user}","gists_url":"https://api.github.com/users/kubernetes/gists{/gist_id}","starred_url":"https://api.github.com/users/kubernetes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubernetes/subscriptions","organizations_url":"https://api.github.com/users/kubernetes/orgs","repos_url":"https://api.github.com/users/kubernetes/repos","events_url":"https://api.github.com/users/kubernetes/events{/privacy}","received_events_url":"https://api.github.com/users/kubernetes/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kubernetes/dashboard","description":"General-purpose web UI for Kubernetes clusters","fork":false,"url":"https://api.github.com/repos/kubernetes/dashboard","forks_url":"https://api.github.com/repos/kubernetes/dashboard/forks","keys_url":"https://api.github.com/repos/kubernetes/dashboard/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kubernetes/dashboard/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kubernetes/dashboard/teams","hooks_url":"https://api.github.com/repos/kubernetes/dashboard/hooks","issue_events_url":"https://api.github.com/repos/kubernetes/dashboard/issues/events{/number}","events_url":"https://api.github.com/repos/kubernetes/dashboard/events","assignees_url":"https://api.github.com/repos/kubernetes/dashboard/assignees{/user}","branches_url":"https://api.github.com/repos/kubernetes/dashboard/branches{/branch}","tags_url":"https://api.github.com/repos/kubernetes/dashboard/tags","blobs_url":"https://api.github.com/repos/kubernetes/dashboard/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kubernetes/dashboard/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kubernetes/dashboard/git/refs{/sha}","trees_url":"https://api.github.com/repos/kubernetes/dashboard/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kubernetes/dashboard/statuses/{sha}","languages_url":"https://api.github.com/repos/kubernetes/dashboard/languages","stargazers_url":"https://api.github.com/repos/kubernetes/dashboard/stargazers","contributors_url":"https://api.github.com/repos/kubernetes/dashboard/contributors","subscribers_url":"https://api.github.com/repos/kubernetes/dashboard/subscribers","subscription_url":"https://api.github.com/repos/kubernetes/dashboard/subscription","commits_url":"https://api.github.com/repos/kubernetes/dashboard/commits{/sha}","git_commits_url":"https://api.github.com/repos/kubernetes/dashboard/git/commits{/sha}","comments_url":"https://api.github.com/repos/kubernetes/dashboard/comments{/number}","issue_comment_url":"https://api.github.com/repos/kubernetes/dashboard/issues/comments{/number}","contents_url":"https://api.github.com/repos/kubernetes/dashboard/contents/{+path}","compare_url":"https://api.github.com/repos/kubernetes/dashboard/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kubernetes/dashboard/merges","archive_url":"https://api.github.com/repos/kubernetes/dashboard/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kubernetes/dashboard/downloads","issues_url":"https://api.github.com/repos/kubernetes/dashboard/issues{/number}","pulls_url":"https://api.github.com/repos/kubernetes/dashboard/pulls{/number}","milestones_url":"https://api.github.com/repos/kubernetes/dashboard/milestones{/number}","notifications_url":"https://api.github.com/repos/kubernetes/dashboard/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kubernetes/dashboard/labels{/name}","releases_url":"https://api.github.com/repos/kubernetes/dashboard/releases{/id}","deployments_url":"https://api.github.com/repos/kubernetes/dashboard/deployments","created_at":"2015-10-15T23:09:14Z","updated_at":"2016-02-02T07:55:04Z","pushed_at":"2016-02-02T08:46:46Z","git_url":"git://github.com/kubernetes/dashboard.git","ssh_url":"git@github.com:kubernetes/dashboard.git","clone_url":"https://github.com/kubernetes/dashboard.git","svn_url":"https://github.com/kubernetes/dashboard","homepage":"","size":43567,"stargazers_count":98,"watchers_count":98,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":29,"mirror_url":null,"open_issues_count":40,"forks":29,"open_issues":40,"watchers":98,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kubernetes/dashboard/pulls/319"},"html":{"href":"https://github.com/kubernetes/dashboard/pull/319"},"issue":{"href":"https://api.github.com/repos/kubernetes/dashboard/issues/319"},"comments":{"href":"https://api.github.com/repos/kubernetes/dashboard/issues/319/comments"},"review_comments":{"href":"https://api.github.com/repos/kubernetes/dashboard/pulls/319/comments"},"review_comment":{"href":"https://api.github.com/repos/kubernetes/dashboard/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kubernetes/dashboard/pulls/319/commits"},"statuses":{"href":"https://api.github.com/repos/kubernetes/dashboard/statuses/847c450b712ef28c47e15816ae25e998986e4e87"}}}}