{"action":"opened","number":27,"pull_request":{"url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/pulls/27","id":53840378,"html_url":"https://github.com/GreatLakesEnergy/sesh-dash-beta/pull/27","diff_url":"https://github.com/GreatLakesEnergy/sesh-dash-beta/pull/27.diff","patch_url":"https://github.com/GreatLakesEnergy/sesh-dash-beta/pull/27.patch","issue_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/issues/27","number":27,"state":"open","locked":false,"title":"Alerts: Send an email if a received data point fails to pass the defined rules #26 ","user":{"login":"cgl","id":1615150,"avatar_url":"https://avatars.githubusercontent.com/u/1615150?v=3","gravatar_id":"","url":"https://api.github.com/users/cgl","html_url":"https://github.com/cgl","followers_url":"https://api.github.com/users/cgl/followers","following_url":"https://api.github.com/users/cgl/following{/other_user}","gists_url":"https://api.github.com/users/cgl/gists{/gist_id}","starred_url":"https://api.github.com/users/cgl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cgl/subscriptions","organizations_url":"https://api.github.com/users/cgl/orgs","repos_url":"https://api.github.com/users/cgl/repos","events_url":"https://api.github.com/users/cgl/events{/privacy}","received_events_url":"https://api.github.com/users/cgl/received_events","type":"User","site_admin":false},"body":"Sends an email if a received data point fails to pass the defined rules.\r\n\r\nNew Alert Rules can be defined as below:\r\n\r\nAlert_Rule.objects.create(site = site, check_field=\"soc\", value=30, operator=\"gt\")\r\nAlert_Rule.objects.create(site = site, check_field=\"soc\", value=35.5, operator=\"eq\")\r\nAlert_Rule.objects.create(site = site, check_field=\"battery_voltage\", value=25, operator=\"lt\")\r\n\r\nRules are based on sites. So you need to define a rule for each site if you want to check same configurations in several sites.\r\n\r\nFor now system sends an alert email to the address seshdash@gmail.com\r\nA new issue on \"site user integration to Alerts\" should be opened.\r\n\r\ntests.py should be tested","created_at":"2015-12-16T13:23:41Z","updated_at":"2015-12-16T13:23:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/pulls/27/commits","review_comments_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/pulls/27/comments","review_comment_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/pulls/comments{/number}","comments_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/issues/27/comments","statuses_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/statuses/8507ba01df54fae6e3049dc244f969c25b3b7f55","head":{"label":"GreatLakesEnergy:cagil_v3","ref":"cagil_v3","sha":"8507ba01df54fae6e3049dc244f969c25b3b7f55","user":{"login":"GreatLakesEnergy","id":13625235,"avatar_url":"https://avatars.githubusercontent.com/u/13625235?v=3","gravatar_id":"","url":"https://api.github.com/users/GreatLakesEnergy","html_url":"https://github.com/GreatLakesEnergy","followers_url":"https://api.github.com/users/GreatLakesEnergy/followers","following_url":"https://api.github.com/users/GreatLakesEnergy/following{/other_user}","gists_url":"https://api.github.com/users/GreatLakesEnergy/gists{/gist_id}","starred_url":"https://api.github.com/users/GreatLakesEnergy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GreatLakesEnergy/subscriptions","organizations_url":"https://api.github.com/users/GreatLakesEnergy/orgs","repos_url":"https://api.github.com/users/GreatLakesEnergy/repos","events_url":"https://api.github.com/users/GreatLakesEnergy/events{/privacy}","received_events_url":"https://api.github.com/users/GreatLakesEnergy/received_events","type":"Organization","site_admin":false},"repo":{"id":45332365,"name":"sesh-dash-beta","full_name":"GreatLakesEnergy/sesh-dash-beta","owner":{"login":"GreatLakesEnergy","id":13625235,"avatar_url":"https://avatars.githubusercontent.com/u/13625235?v=3","gravatar_id":"","url":"https://api.github.com/users/GreatLakesEnergy","html_url":"https://github.com/GreatLakesEnergy","followers_url":"https://api.github.com/users/GreatLakesEnergy/followers","following_url":"https://api.github.com/users/GreatLakesEnergy/following{/other_user}","gists_url":"https://api.github.com/users/GreatLakesEnergy/gists{/gist_id}","starred_url":"https://api.github.com/users/GreatLakesEnergy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GreatLakesEnergy/subscriptions","organizations_url":"https://api.github.com/users/GreatLakesEnergy/orgs","repos_url":"https://api.github.com/users/GreatLakesEnergy/repos","events_url":"https://api.github.com/users/GreatLakesEnergy/events{/privacy}","received_events_url":"https://api.github.com/users/GreatLakesEnergy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/GreatLakesEnergy/sesh-dash-beta","description":"SESH Dashboard beta. Working dev code","fork":false,"url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta","forks_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/forks","keys_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/teams","hooks_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/hooks","issue_events_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/issues/events{/number}","events_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/events","assignees_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/assignees{/user}","branches_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/branches{/branch}","tags_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/tags","blobs_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/git/refs{/sha}","trees_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/statuses/{sha}","languages_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/languages","stargazers_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/stargazers","contributors_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/contributors","subscribers_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/subscribers","subscription_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/subscription","commits_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/commits{/sha}","git_commits_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/git/commits{/sha}","comments_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/comments{/number}","issue_comment_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/issues/comments{/number}","contents_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/contents/{+path}","compare_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/merges","archive_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/downloads","issues_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/issues{/number}","pulls_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/pulls{/number}","milestones_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/milestones{/number}","notifications_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/labels{/name}","releases_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/releases{/id}","created_at":"2015-11-01T07:54:15Z","updated_at":"2015-11-17T11:36:15Z","pushed_at":"2015-12-16T12:51:17Z","git_url":"git://github.com/GreatLakesEnergy/sesh-dash-beta.git","ssh_url":"git@github.com:GreatLakesEnergy/sesh-dash-beta.git","clone_url":"https://github.com/GreatLakesEnergy/sesh-dash-beta.git","svn_url":"https://github.com/GreatLakesEnergy/sesh-dash-beta","homepage":null,"size":9226,"stargazers_count":3,"watchers_count":3,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":2,"forks":3,"open_issues":2,"watchers":3,"default_branch":"master"}},"base":{"label":"GreatLakesEnergy:master","ref":"master","sha":"96897d161a426174076f8b2985da83b5cf3d59cc","user":{"login":"GreatLakesEnergy","id":13625235,"avatar_url":"https://avatars.githubusercontent.com/u/13625235?v=3","gravatar_id":"","url":"https://api.github.com/users/GreatLakesEnergy","html_url":"https://github.com/GreatLakesEnergy","followers_url":"https://api.github.com/users/GreatLakesEnergy/followers","following_url":"https://api.github.com/users/GreatLakesEnergy/following{/other_user}","gists_url":"https://api.github.com/users/GreatLakesEnergy/gists{/gist_id}","starred_url":"https://api.github.com/users/GreatLakesEnergy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GreatLakesEnergy/subscriptions","organizations_url":"https://api.github.com/users/GreatLakesEnergy/orgs","repos_url":"https://api.github.com/users/GreatLakesEnergy/repos","events_url":"https://api.github.com/users/GreatLakesEnergy/events{/privacy}","received_events_url":"https://api.github.com/users/GreatLakesEnergy/received_events","type":"Organization","site_admin":false},"repo":{"id":45332365,"name":"sesh-dash-beta","full_name":"GreatLakesEnergy/sesh-dash-beta","owner":{"login":"GreatLakesEnergy","id":13625235,"avatar_url":"https://avatars.githubusercontent.com/u/13625235?v=3","gravatar_id":"","url":"https://api.github.com/users/GreatLakesEnergy","html_url":"https://github.com/GreatLakesEnergy","followers_url":"https://api.github.com/users/GreatLakesEnergy/followers","following_url":"https://api.github.com/users/GreatLakesEnergy/following{/other_user}","gists_url":"https://api.github.com/users/GreatLakesEnergy/gists{/gist_id}","starred_url":"https://api.github.com/users/GreatLakesEnergy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GreatLakesEnergy/subscriptions","organizations_url":"https://api.github.com/users/GreatLakesEnergy/orgs","repos_url":"https://api.github.com/users/GreatLakesEnergy/repos","events_url":"https://api.github.com/users/GreatLakesEnergy/events{/privacy}","received_events_url":"https://api.github.com/users/GreatLakesEnergy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/GreatLakesEnergy/sesh-dash-beta","description":"SESH Dashboard beta. Working dev code","fork":false,"url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta","forks_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/forks","keys_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/teams","hooks_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/hooks","issue_events_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/issues/events{/number}","events_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/events","assignees_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/assignees{/user}","branches_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/branches{/branch}","tags_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/tags","blobs_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/git/refs{/sha}","trees_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/statuses/{sha}","languages_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/languages","stargazers_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/stargazers","contributors_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/contributors","subscribers_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/subscribers","subscription_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/subscription","commits_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/commits{/sha}","git_commits_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/git/commits{/sha}","comments_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/comments{/number}","issue_comment_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/issues/comments{/number}","contents_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/contents/{+path}","compare_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/merges","archive_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/downloads","issues_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/issues{/number}","pulls_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/pulls{/number}","milestones_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/milestones{/number}","notifications_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/labels{/name}","releases_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/releases{/id}","created_at":"2015-11-01T07:54:15Z","updated_at":"2015-11-17T11:36:15Z","pushed_at":"2015-12-16T12:51:17Z","git_url":"git://github.com/GreatLakesEnergy/sesh-dash-beta.git","ssh_url":"git@github.com:GreatLakesEnergy/sesh-dash-beta.git","clone_url":"https://github.com/GreatLakesEnergy/sesh-dash-beta.git","svn_url":"https://github.com/GreatLakesEnergy/sesh-dash-beta","homepage":null,"size":9226,"stargazers_count":3,"watchers_count":3,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":2,"forks":3,"open_issues":2,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/pulls/27"},"html":{"href":"https://github.com/GreatLakesEnergy/sesh-dash-beta/pull/27"},"issue":{"href":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/issues/27"},"comments":{"href":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/issues/27/comments"},"review_comments":{"href":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/pulls/27/comments"},"review_comment":{"href":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/pulls/27/commits"},"statuses":{"href":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/statuses/8507ba01df54fae6e3049dc244f969c25b3b7f55"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":12,"additions":81,"deletions":24,"changed_files":8}}