{"action":"created","comment":{"url":"https://api.github.com/repos/emmberk/ddf/pulls/comments/106558523","pull_request_review_id":27487447,"id":106558523,"diff_hunk":"@@ -0,0 +1,58 @@\n+/**\n+ * Copyright (c) Codice Foundation\n+ * <p>\n+ * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser\n+ * General Public License as published by the Free Software Foundation, either version 3 of the\n+ * License, or any later version.\n+ * <p>\n+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without\n+ * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n+ * Lesser General Public License for more details. A copy of the GNU Lesser General Public License\n+ * is distributed along with this program and can be found at\n+ * <http://www.gnu.org/licenses/lgpl.html>.\n+ */\n+package org.codice.ddf.admin.alert.service;\n+\n+import java.util.ArrayList;\n+import java.util.List;\n+\n+import javax.annotation.Nonnull;\n+\n+public class Alert {\n+\n+    private Type type;\n+\n+    private String title;\n+\n+    private List<AlertDetail> details;","path":"platform/admin/core/admin-core-alertservice-api/src/main/java/org/codice/ddf/admin/alert/service/Alert.java","position":null,"original_position":27,"commit_id":"e7b4b7184e562777af4813af9630ff5829fcb49b","original_commit_id":"41f65d9dc6383fbdfe6f0a03ab207f49d3bbad00","user":{"login":"emmberk","id":8041246,"avatar_url":"https://avatars0.githubusercontent.com/u/8041246?v=3","gravatar_id":"","url":"https://api.github.com/users/emmberk","html_url":"https://github.com/emmberk","followers_url":"https://api.github.com/users/emmberk/followers","following_url":"https://api.github.com/users/emmberk/following{/other_user}","gists_url":"https://api.github.com/users/emmberk/gists{/gist_id}","starred_url":"https://api.github.com/users/emmberk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emmberk/subscriptions","organizations_url":"https://api.github.com/users/emmberk/orgs","repos_url":"https://api.github.com/users/emmberk/repos","events_url":"https://api.github.com/users/emmberk/events{/privacy}","received_events_url":"https://api.github.com/users/emmberk/received_events","type":"User","site_admin":false},"body":"👍  I added a TODO to make this change","created_at":"2017-03-16T23:53:22Z","updated_at":"2017-03-16T23:53:22Z","html_url":"https://github.com/emmberk/ddf/pull/13#discussion_r106558523","pull_request_url":"https://api.github.com/repos/emmberk/ddf/pulls/13","_links":{"self":{"href":"https://api.github.com/repos/emmberk/ddf/pulls/comments/106558523"},"html":{"href":"https://github.com/emmberk/ddf/pull/13#discussion_r106558523"},"pull_request":{"href":"https://api.github.com/repos/emmberk/ddf/pulls/13"}}},"pull_request":{"url":"https://api.github.com/repos/emmberk/ddf/pulls/13","id":109047794,"html_url":"https://github.com/emmberk/ddf/pull/13","diff_url":"https://github.com/emmberk/ddf/pull/13.diff","patch_url":"https://github.com/emmberk/ddf/pull/13.patch","issue_url":"https://api.github.com/repos/emmberk/ddf/issues/13","number":13,"state":"open","locked":false,"title":"system administrator alerts","user":{"login":"emmberk","id":8041246,"avatar_url":"https://avatars0.githubusercontent.com/u/8041246?v=3","gravatar_id":"","url":"https://api.github.com/users/emmberk","html_url":"https://github.com/emmberk","followers_url":"https://api.github.com/users/emmberk/followers","following_url":"https://api.github.com/users/emmberk/following{/other_user}","gists_url":"https://api.github.com/users/emmberk/gists{/gist_id}","starred_url":"https://api.github.com/users/emmberk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emmberk/subscriptions","organizations_url":"https://api.github.com/users/emmberk/orgs","repos_url":"https://api.github.com/users/emmberk/repos","events_url":"https://api.github.com/users/emmberk/events{/privacy}","received_events_url":"https://api.github.com/users/emmberk/received_events","type":"User","site_admin":false},"body":"**This may look like a lot to review, but there's a few distinct parts. The API is really simple. If anything is still confusing, I should add to the javadocs, so let me know.**\r\n\r\n- Alerts API\r\n  - `Alert.java`\r\n  - `AlertDetail.java`\r\n  - `AlertServiceImpl.java` implements `AlertService.java`\r\n  - `AlertsPoller.java` (_This interface may be confusing/not implemented in the best way. I'm looking for implementation and javadoc suggestions._)\r\n- `/Alerts`, `/dismissAlert` endpoints\r\n  - front-end\r\n    - `style.css`\r\n    - `Alerts.js`\r\n    - `Alerts.view.js`\r\n    - `main.js`\r\n    - `alerts.handlebars`\r\n  - back-end\r\n    - `AlertServiceBean.java` implements `AlertServiceBeanMBean.java`\r\n- Make the Insecure Defaults banner using the AlertService\r\n  - `InsecureDefaultsAlertsPoller.java`\r\n  - removed `InsecureDefaultsServiceBean.java` (_This was the only endpoint used to make the Insecure Default banner._)\r\n- Backup logger\r\n  - `log4j2.config.xml`\r\n  - `org.ops4j.pax.logging.cfg`\r\n  - `AdminAlertAppender.java`\r\n\r\n![image](https://cloud.githubusercontent.com/assets/8041246/23568316/29eb9eec-0017-11e7-8824-ce3e8b70bfbe.png)\r\n\r\n---\r\n\r\nWhat to review:\r\n- [ ] Naming of things (e.g. `Alert`, `AlertsPoller`, packages, `Level`, etc.)\r\n- [ ] API\r\n- [ ] Does `Dismiss` make sense?\r\n- [ ] Implementation of `AlertsPoller` and that it exists in addition to `AlertService`\r\n- [ ] Anything missing in javadocs?\r\n- [ ] Can `AlertServiceBean.java` and `AlertServiceImpl.java` be combined into one class that implements both `AlertService` and `AlertServiceBeanMBean`?\r\n\r\n---\r\n\r\nTODO:\r\n- [x] Use internal packages\r\n- [ ] Address TODOs left in code\r\n- [ ] Unit tests\r\n- [ ] Backport version of this ticket\r\n- [ ] Javadoc\r\n- [x] Add session timeout alert back in\r\n- [ ] Add more comments in code\r\n- Documentation\r\n    - [ ] Logging appender\r\n    - [ ] AlertService API and impls\r\n- [ ] Error handling\r\n- [ ] Combine `AlertServiceImpl` and `AlertServiceBean`?\r\n- [ ] Make sure works from clean repository\r\n- [ ] Fix how often the /Alerts endpoint is actually checked -- needs to be \"immediate real-time\"\r\n\r\n---\r\n\r\nSplit up commits in this order (draft):\r\n1. alerts api\r\n2. alerts impls\r\n3. log4j2 logging appender\r\n4. ui changes (insecure defaults implements alertservice)\r\n5. removing the current insecure defaults service (won't be backported)\r\n\r\n---\r\n\r\n@brianfelix @clockard @mcalcote @vinamartin @ricklarsen","created_at":"2017-03-03T20:18:36Z","updated_at":"2017-03-16T23:53:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8c5d4f32d23b2464f949a2838dcec31fd91c93a4","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/emmberk/ddf/pulls/13/commits","review_comments_url":"https://api.github.com/repos/emmberk/ddf/pulls/13/comments","review_comment_url":"https://api.github.com/repos/emmberk/ddf/pulls/comments{/number}","comments_url":"https://api.github.com/repos/emmberk/ddf/issues/13/comments","statuses_url":"https://api.github.com/repos/emmberk/ddf/statuses/e7b4b7184e562777af4813af9630ff5829fcb49b","head":{"label":"emmberk:alerts","ref":"alerts","sha":"e7b4b7184e562777af4813af9630ff5829fcb49b","user":{"login":"emmberk","id":8041246,"avatar_url":"https://avatars0.githubusercontent.com/u/8041246?v=3","gravatar_id":"","url":"https://api.github.com/users/emmberk","html_url":"https://github.com/emmberk","followers_url":"https://api.github.com/users/emmberk/followers","following_url":"https://api.github.com/users/emmberk/following{/other_user}","gists_url":"https://api.github.com/users/emmberk/gists{/gist_id}","starred_url":"https://api.github.com/users/emmberk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emmberk/subscriptions","organizations_url":"https://api.github.com/users/emmberk/orgs","repos_url":"https://api.github.com/users/emmberk/repos","events_url":"https://api.github.com/users/emmberk/events{/privacy}","received_events_url":"https://api.github.com/users/emmberk/received_events","type":"User","site_admin":false},"repo":{"id":60542616,"name":"ddf","full_name":"emmberk/ddf","owner":{"login":"emmberk","id":8041246,"avatar_url":"https://avatars0.githubusercontent.com/u/8041246?v=3","gravatar_id":"","url":"https://api.github.com/users/emmberk","html_url":"https://github.com/emmberk","followers_url":"https://api.github.com/users/emmberk/followers","following_url":"https://api.github.com/users/emmberk/following{/other_user}","gists_url":"https://api.github.com/users/emmberk/gists{/gist_id}","starred_url":"https://api.github.com/users/emmberk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emmberk/subscriptions","organizations_url":"https://api.github.com/users/emmberk/orgs","repos_url":"https://api.github.com/users/emmberk/repos","events_url":"https://api.github.com/users/emmberk/events{/privacy}","received_events_url":"https://api.github.com/users/emmberk/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/emmberk/ddf","description":"Distributed Data Framework - an open source, modular integration framework.","fork":true,"url":"https://api.github.com/repos/emmberk/ddf","forks_url":"https://api.github.com/repos/emmberk/ddf/forks","keys_url":"https://api.github.com/repos/emmberk/ddf/keys{/key_id}","collaborators_url":"https://api.github.com/repos/emmberk/ddf/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/emmberk/ddf/teams","hooks_url":"https://api.github.com/repos/emmberk/ddf/hooks","issue_events_url":"https://api.github.com/repos/emmberk/ddf/issues/events{/number}","events_url":"https://api.github.com/repos/emmberk/ddf/events","assignees_url":"https://api.github.com/repos/emmberk/ddf/assignees{/user}","branches_url":"https://api.github.com/repos/emmberk/ddf/branches{/branch}","tags_url":"https://api.github.com/repos/emmberk/ddf/tags","blobs_url":"https://api.github.com/repos/emmberk/ddf/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/emmberk/ddf/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/emmberk/ddf/git/refs{/sha}","trees_url":"https://api.github.com/repos/emmberk/ddf/git/trees{/sha}","statuses_url":"https://api.github.com/repos/emmberk/ddf/statuses/{sha}","languages_url":"https://api.github.com/repos/emmberk/ddf/languages","stargazers_url":"https://api.github.com/repos/emmberk/ddf/stargazers","contributors_url":"https://api.github.com/repos/emmberk/ddf/contributors","subscribers_url":"https://api.github.com/repos/emmberk/ddf/subscribers","subscription_url":"https://api.github.com/repos/emmberk/ddf/subscription","commits_url":"https://api.github.com/repos/emmberk/ddf/commits{/sha}","git_commits_url":"https://api.github.com/repos/emmberk/ddf/git/commits{/sha}","comments_url":"https://api.github.com/repos/emmberk/ddf/comments{/number}","issue_comment_url":"https://api.github.com/repos/emmberk/ddf/issues/comments{/number}","contents_url":"https://api.github.com/repos/emmberk/ddf/contents/{+path}","compare_url":"https://api.github.com/repos/emmberk/ddf/compare/{base}...{head}","merges_url":"https://api.github.com/repos/emmberk/ddf/merges","archive_url":"https://api.github.com/repos/emmberk/ddf/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/emmberk/ddf/downloads","issues_url":"https://api.github.com/repos/emmberk/ddf/issues{/number}","pulls_url":"https://api.github.com/repos/emmberk/ddf/pulls{/number}","milestones_url":"https://api.github.com/repos/emmberk/ddf/milestones{/number}","notifications_url":"https://api.github.com/repos/emmberk/ddf/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/emmberk/ddf/labels{/name}","releases_url":"https://api.github.com/repos/emmberk/ddf/releases{/id}","deployments_url":"https://api.github.com/repos/emmberk/ddf/deployments","created_at":"2016-06-06T16:18:42Z","updated_at":"2016-06-06T16:18:54Z","pushed_at":"2017-03-16T23:51:48Z","git_url":"git://github.com/emmberk/ddf.git","ssh_url":"git@github.com:emmberk/ddf.git","clone_url":"https://github.com/emmberk/ddf.git","svn_url":"https://github.com/emmberk/ddf","homepage":"http://ddf.codice.org","size":152148,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"emmberk:fake-master","ref":"fake-master","sha":"fa97de329f2311fa359355e53d91a1db26b6b087","user":{"login":"emmberk","id":8041246,"avatar_url":"https://avatars0.githubusercontent.com/u/8041246?v=3","gravatar_id":"","url":"https://api.github.com/users/emmberk","html_url":"https://github.com/emmberk","followers_url":"https://api.github.com/users/emmberk/followers","following_url":"https://api.github.com/users/emmberk/following{/other_user}","gists_url":"https://api.github.com/users/emmberk/gists{/gist_id}","starred_url":"https://api.github.com/users/emmberk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emmberk/subscriptions","organizations_url":"https://api.github.com/users/emmberk/orgs","repos_url":"https://api.github.com/users/emmberk/repos","events_url":"https://api.github.com/users/emmberk/events{/privacy}","received_events_url":"https://api.github.com/users/emmberk/received_events","type":"User","site_admin":false},"repo":{"id":60542616,"name":"ddf","full_name":"emmberk/ddf","owner":{"login":"emmberk","id":8041246,"avatar_url":"https://avatars0.githubusercontent.com/u/8041246?v=3","gravatar_id":"","url":"https://api.github.com/users/emmberk","html_url":"https://github.com/emmberk","followers_url":"https://api.github.com/users/emmberk/followers","following_url":"https://api.github.com/users/emmberk/following{/other_user}","gists_url":"https://api.github.com/users/emmberk/gists{/gist_id}","starred_url":"https://api.github.com/users/emmberk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emmberk/subscriptions","organizations_url":"https://api.github.com/users/emmberk/orgs","repos_url":"https://api.github.com/users/emmberk/repos","events_url":"https://api.github.com/users/emmberk/events{/privacy}","received_events_url":"https://api.github.com/users/emmberk/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/emmberk/ddf","description":"Distributed Data Framework - an open source, modular integration framework.","fork":true,"url":"https://api.github.com/repos/emmberk/ddf","forks_url":"https://api.github.com/repos/emmberk/ddf/forks","keys_url":"https://api.github.com/repos/emmberk/ddf/keys{/key_id}","collaborators_url":"https://api.github.com/repos/emmberk/ddf/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/emmberk/ddf/teams","hooks_url":"https://api.github.com/repos/emmberk/ddf/hooks","issue_events_url":"https://api.github.com/repos/emmberk/ddf/issues/events{/number}","events_url":"https://api.github.com/repos/emmberk/ddf/events","assignees_url":"https://api.github.com/repos/emmberk/ddf/assignees{/user}","branches_url":"https://api.github.com/repos/emmberk/ddf/branches{/branch}","tags_url":"https://api.github.com/repos/emmberk/ddf/tags","blobs_url":"https://api.github.com/repos/emmberk/ddf/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/emmberk/ddf/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/emmberk/ddf/git/refs{/sha}","trees_url":"https://api.github.com/repos/emmberk/ddf/git/trees{/sha}","statuses_url":"https://api.github.com/repos/emmberk/ddf/statuses/{sha}","languages_url":"https://api.github.com/repos/emmberk/ddf/languages","stargazers_url":"https://api.github.com/repos/emmberk/ddf/stargazers","contributors_url":"https://api.github.com/repos/emmberk/ddf/contributors","subscribers_url":"https://api.github.com/repos/emmberk/ddf/subscribers","subscription_url":"https://api.github.com/repos/emmberk/ddf/subscription","commits_url":"https://api.github.com/repos/emmberk/ddf/commits{/sha}","git_commits_url":"https://api.github.com/repos/emmberk/ddf/git/commits{/sha}","comments_url":"https://api.github.com/repos/emmberk/ddf/comments{/number}","issue_comment_url":"https://api.github.com/repos/emmberk/ddf/issues/comments{/number}","contents_url":"https://api.github.com/repos/emmberk/ddf/contents/{+path}","compare_url":"https://api.github.com/repos/emmberk/ddf/compare/{base}...{head}","merges_url":"https://api.github.com/repos/emmberk/ddf/merges","archive_url":"https://api.github.com/repos/emmberk/ddf/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/emmberk/ddf/downloads","issues_url":"https://api.github.com/repos/emmberk/ddf/issues{/number}","pulls_url":"https://api.github.com/repos/emmberk/ddf/pulls{/number}","milestones_url":"https://api.github.com/repos/emmberk/ddf/milestones{/number}","notifications_url":"https://api.github.com/repos/emmberk/ddf/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/emmberk/ddf/labels{/name}","releases_url":"https://api.github.com/repos/emmberk/ddf/releases{/id}","deployments_url":"https://api.github.com/repos/emmberk/ddf/deployments","created_at":"2016-06-06T16:18:42Z","updated_at":"2016-06-06T16:18:54Z","pushed_at":"2017-03-16T23:51:48Z","git_url":"git://github.com/emmberk/ddf.git","ssh_url":"git@github.com:emmberk/ddf.git","clone_url":"https://github.com/emmberk/ddf.git","svn_url":"https://github.com/emmberk/ddf","homepage":"http://ddf.codice.org","size":152148,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/emmberk/ddf/pulls/13"},"html":{"href":"https://github.com/emmberk/ddf/pull/13"},"issue":{"href":"https://api.github.com/repos/emmberk/ddf/issues/13"},"comments":{"href":"https://api.github.com/repos/emmberk/ddf/issues/13/comments"},"review_comments":{"href":"https://api.github.com/repos/emmberk/ddf/pulls/13/comments"},"review_comment":{"href":"https://api.github.com/repos/emmberk/ddf/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/emmberk/ddf/pulls/13/commits"},"statuses":{"href":"https://api.github.com/repos/emmberk/ddf/statuses/e7b4b7184e562777af4813af9630ff5829fcb49b"}}}}
{"actor":{"display_login":"emmberk"}}