{"action":"created","comment":{"url":"https://api.github.com/repos/SjonHortensius/pfsense/pulls/comments/29943120","id":29943120,"diff_hunk":"@@ -80,71 +84,146 @@ function stat_block($summary, $stat, $num) {\n \t\t\t$numentries++;\n \t\t\t$outstr = $k[$i];\n \t\t\tif (is_ipaddr($outstr)) {\n-\t\t\t\t$outstr = \"<a href=\\\"diag_dns.php?host={$outstr}\\\" title=\\\"\".gettext(\"Reverse Resolve with DNS\").\"\\\"><img border=\\\"0\\\" src=\\\"/themes/{$g['theme']}/images/icons/icon_log.gif\\\" alt=\\\"log\\\" /></a> {$outstr}\";\n+\t\t\t\tprint('<tr><td>' . $outstr . '</td>' . '<td>' . $summary[$stat][$k[$i]] . '</td><td><a href=\"diag_dns.php?host=' . $outstr . '\" class=\"btn btn-xs btn-success\" title=\"' . gettext(\"Reverse Resolve with DNS\") . '\">Lookup</a></td></tr>');\n+\n \t\t\t} elseif (substr_count($outstr, '/') == 1) {\n \t\t\t\tlist($proto, $port) = explode('/', $outstr);\n \t\t\t\t$service = getservbyport($port, strtolower($proto));\n \t\t\t\tif ($service)\n \t\t\t\t\t$outstr .= \": {$service}\";\n \t\t\t}\n-\t\t\tprint \"<tr><td>{$outstr}</td><td width=\\\"50\\\" align=\\\"right\\\">{$summary[$stat][$k[$i]]}</td></tr>\";\n+\n+\t\t\tif(!is_ipaddr($outstr))\n+\t\t\t\tprint('<tr><td>' . $outstr . '</td><td>' . $summary[$stat][$k[$i]] . '</td><td></td></tr>');\n \t\t}\n \t}\n \t$leftover = $gotlines - $total;\n \tif ($leftover > 0) {\n-\t\tprint \"<tr><td>Other</td><td width=\\\"50\\\" align=\\\"right\\\">{$leftover}</td></tr>\";\n+\t\tprint \"<tr><td>Other</td><td>{$leftover}</td><td></td>\";\n \t}\n \tprint \"</table>\";\n+\tprint('</div>');\n }\n \n-function pie_block($summary, $stat, $num) {\n-\tglobal $gotlines, $fields;\n+// Create the JSON document for the chart to be displayed\n+// Todo: Be good to investigate building this with json_encode and friends some time\n+function pie_block($summary, $stat, $num, $chartnum) {\n+\tglobal $fields, $segcolors, $gotlines, $numcolors;\n+\n+\techo <<<PIEEND","path":"usr/local/www/diag_logs_filter_summary.php","position":96,"original_position":96,"commit_id":"3e19c70439dad5e56bbeadf1a4469bc4d2cec015","original_commit_id":"3e19c70439dad5e56bbeadf1a4469bc4d2cec015","user":{"login":"sbeaver-netgate","id":11539696,"avatar_url":"https://avatars.githubusercontent.com/u/11539696?v=3","gravatar_id":"","url":"https://api.github.com/users/sbeaver-netgate","html_url":"https://github.com/sbeaver-netgate","followers_url":"https://api.github.com/users/sbeaver-netgate/followers","following_url":"https://api.github.com/users/sbeaver-netgate/following{/other_user}","gists_url":"https://api.github.com/users/sbeaver-netgate/gists{/gist_id}","starred_url":"https://api.github.com/users/sbeaver-netgate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sbeaver-netgate/subscriptions","organizations_url":"https://api.github.com/users/sbeaver-netgate/orgs","repos_url":"https://api.github.com/users/sbeaver-netgate/repos","events_url":"https://api.github.com/users/sbeaver-netgate/events{/privacy}","received_events_url":"https://api.github.com/users/sbeaver-netgate/received_events","type":"User","site_admin":false},"body":"I’ll consider that. Thanks for the suggestion.\n\n> On May 8, 2015, at 10:03 AM, SjonHortensius <notifications@github.com> wrote:\n> \n> In usr/local/www/diag_logs_filter_summary.php <https://github.com/SjonHortensius/pfsense/pull/172#discussion_r29941770>:\n> \n> >  }\n> >  \n> > -function pie_block($summary, $stat, $num) {\n> > -\tglobal $gotlines, $fields;\n> > +// Create the JSON document for the chart to be displayed\n> > +// Todo: Be good to investigate building this with json_encode and friends some time\n> > +function pie_block($summary, $stat, $num, $chartnum) {\n> > +\tglobal $fields, $segcolors, $gotlines, $numcolors;\n> > +\n> > +\techo <<<PIEEND\n> Why not use\n> \n> ?>\n> <script>\n> var pie = new d3pie(\"pieChart <?=$chartnum?>, {\n>     \"header\"....\n> like we do for html output?\n> \n> —\n> Reply to this email directly or view it on GitHub <https://github.com/SjonHortensius/pfsense/pull/172/files#r29941770>.\n> \n\nSteve\n--\nStephen Beaver | +1 (512) 646-4100;239 | sbeaver@netgate.com <mailto:sbeaver@netgate.com> | www.netgate.com <http://www.netgate.com/>\n\n\n\n","created_at":"2015-05-08T14:20:01Z","updated_at":"2015-05-08T14:20:01Z","html_url":"https://github.com/SjonHortensius/pfsense/pull/172#discussion_r29943120","pull_request_url":"https://api.github.com/repos/SjonHortensius/pfsense/pulls/172","_links":{"self":{"href":"https://api.github.com/repos/SjonHortensius/pfsense/pulls/comments/29943120"},"html":{"href":"https://github.com/SjonHortensius/pfsense/pull/172#discussion_r29943120"},"pull_request":{"href":"https://api.github.com/repos/SjonHortensius/pfsense/pulls/172"}}},"pull_request":{"url":"https://api.github.com/repos/SjonHortensius/pfsense/pulls/172","id":34860474,"html_url":"https://github.com/SjonHortensius/pfsense/pull/172","diff_url":"https://github.com/SjonHortensius/pfsense/pull/172.diff","patch_url":"https://github.com/SjonHortensius/pfsense/pull/172.patch","issue_url":"https://api.github.com/repos/SjonHortensius/pfsense/issues/172","number":172,"state":"open","locked":false,"title":"Diag logs filter summary","user":{"login":"sbeaver-netgate","id":11539696,"avatar_url":"https://avatars.githubusercontent.com/u/11539696?v=3","gravatar_id":"","url":"https://api.github.com/users/sbeaver-netgate","html_url":"https://github.com/sbeaver-netgate","followers_url":"https://api.github.com/users/sbeaver-netgate/followers","following_url":"https://api.github.com/users/sbeaver-netgate/following{/other_user}","gists_url":"https://api.github.com/users/sbeaver-netgate/gists{/gist_id}","starred_url":"https://api.github.com/users/sbeaver-netgate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sbeaver-netgate/subscriptions","organizations_url":"https://api.github.com/users/sbeaver-netgate/orgs","repos_url":"https://api.github.com/users/sbeaver-netgate/repos","events_url":"https://api.github.com/users/sbeaver-netgate/events{/privacy}","received_events_url":"https://api.github.com/users/sbeaver-netgate/received_events","type":"User","site_admin":false},"body":"Ready for review\n\nThe previous charing system is not compatible with JQuery (because it\nmakes use of its own $() macros and converting the code would be\nhorrible. It is not responsive or attractive anyway.\n\nThe library has been removed and replaced by d3pie.js. The page has\nbeen re-written to use the new library.\n\nSeems to look very nice and the code is quite clean.","created_at":"2015-05-06T21:09:39Z","updated_at":"2015-05-08T14:20:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"661ecaff2bb647bf58749d4fecf5cf98b396a2e1","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/SjonHortensius/pfsense/pulls/172/commits","review_comments_url":"https://api.github.com/repos/SjonHortensius/pfsense/pulls/172/comments","review_comment_url":"https://api.github.com/repos/SjonHortensius/pfsense/pulls/comments{/number}","comments_url":"https://api.github.com/repos/SjonHortensius/pfsense/issues/172/comments","statuses_url":"https://api.github.com/repos/SjonHortensius/pfsense/statuses/3e19c70439dad5e56bbeadf1a4469bc4d2cec015","head":{"label":"sbeaver-netgate:diag_logs_filter_summary","ref":"diag_logs_filter_summary","sha":"3e19c70439dad5e56bbeadf1a4469bc4d2cec015","user":{"login":"sbeaver-netgate","id":11539696,"avatar_url":"https://avatars.githubusercontent.com/u/11539696?v=3","gravatar_id":"","url":"https://api.github.com/users/sbeaver-netgate","html_url":"https://github.com/sbeaver-netgate","followers_url":"https://api.github.com/users/sbeaver-netgate/followers","following_url":"https://api.github.com/users/sbeaver-netgate/following{/other_user}","gists_url":"https://api.github.com/users/sbeaver-netgate/gists{/gist_id}","starred_url":"https://api.github.com/users/sbeaver-netgate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sbeaver-netgate/subscriptions","organizations_url":"https://api.github.com/users/sbeaver-netgate/orgs","repos_url":"https://api.github.com/users/sbeaver-netgate/repos","events_url":"https://api.github.com/users/sbeaver-netgate/events{/privacy}","received_events_url":"https://api.github.com/users/sbeaver-netgate/received_events","type":"User","site_admin":false},"repo":{"id":32476980,"name":"pfsense","full_name":"sbeaver-netgate/pfsense","owner":{"login":"sbeaver-netgate","id":11539696,"avatar_url":"https://avatars.githubusercontent.com/u/11539696?v=3","gravatar_id":"","url":"https://api.github.com/users/sbeaver-netgate","html_url":"https://github.com/sbeaver-netgate","followers_url":"https://api.github.com/users/sbeaver-netgate/followers","following_url":"https://api.github.com/users/sbeaver-netgate/following{/other_user}","gists_url":"https://api.github.com/users/sbeaver-netgate/gists{/gist_id}","starred_url":"https://api.github.com/users/sbeaver-netgate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sbeaver-netgate/subscriptions","organizations_url":"https://api.github.com/users/sbeaver-netgate/orgs","repos_url":"https://api.github.com/users/sbeaver-netgate/repos","events_url":"https://api.github.com/users/sbeaver-netgate/events{/privacy}","received_events_url":"https://api.github.com/users/sbeaver-netgate/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sbeaver-netgate/pfsense","description":"We are migrating pfSense to bootstrap!","fork":true,"url":"https://api.github.com/repos/sbeaver-netgate/pfsense","forks_url":"https://api.github.com/repos/sbeaver-netgate/pfsense/forks","keys_url":"https://api.github.com/repos/sbeaver-netgate/pfsense/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sbeaver-netgate/pfsense/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sbeaver-netgate/pfsense/teams","hooks_url":"https://api.github.com/repos/sbeaver-netgate/pfsense/hooks","issue_events_url":"https://api.github.com/repos/sbeaver-netgate/pfsense/issues/events{/number}","events_url":"https://api.github.com/repos/sbeaver-netgate/pfsense/events","assignees_url":"https://api.github.com/repos/sbeaver-netgate/pfsense/assignees{/user}","branches_url":"https://api.github.com/repos/sbeaver-netgate/pfsense/branches{/branch}","tags_url":"https://api.github.com/repos/sbeaver-netgate/pfsense/tags","blobs_url":"https://api.github.com/repos/sbeaver-netgate/pfsense/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sbeaver-netgate/pfsense/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sbeaver-netgate/pfsense/git/refs{/sha}","trees_url":"https://api.github.com/repos/sbeaver-netgate/pfsense/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sbeaver-netgate/pfsense/statuses/{sha}","languages_url":"https://api.github.com/repos/sbeaver-netgate/pfsense/languages","stargazers_url":"https://api.github.com/repos/sbeaver-netgate/pfsense/stargazers","contributors_url":"https://api.github.com/repos/sbeaver-netgate/pfsense/contributors","subscribers_url":"https://api.github.com/repos/sbeaver-netgate/pfsense/subscribers","subscription_url":"https://api.github.com/repos/sbeaver-netgate/pfsense/subscription","commits_url":"https://api.github.com/repos/sbeaver-netgate/pfsense/commits{/sha}","git_commits_url":"https://api.github.com/repos/sbeaver-netgate/pfsense/git/commits{/sha}","comments_url":"https://api.github.com/repos/sbeaver-netgate/pfsense/comments{/number}","issue_comment_url":"https://api.github.com/repos/sbeaver-netgate/pfsense/issues/comments{/number}","contents_url":"https://api.github.com/repos/sbeaver-netgate/pfsense/contents/{+path}","compare_url":"https://api.github.com/repos/sbeaver-netgate/pfsense/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sbeaver-netgate/pfsense/merges","archive_url":"https://api.github.com/repos/sbeaver-netgate/pfsense/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sbeaver-netgate/pfsense/downloads","issues_url":"https://api.github.com/repos/sbeaver-netgate/pfsense/issues{/number}","pulls_url":"https://api.github.com/repos/sbeaver-netgate/pfsense/pulls{/number}","milestones_url":"https://api.github.com/repos/sbeaver-netgate/pfsense/milestones{/number}","notifications_url":"https://api.github.com/repos/sbeaver-netgate/pfsense/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sbeaver-netgate/pfsense/labels{/name}","releases_url":"https://api.github.com/repos/sbeaver-netgate/pfsense/releases{/id}","created_at":"2015-03-18T18:30:49Z","updated_at":"2015-04-28T11:23:11Z","pushed_at":"2015-05-08T14:01:10Z","git_url":"git://github.com/sbeaver-netgate/pfsense.git","ssh_url":"git@github.com:sbeaver-netgate/pfsense.git","clone_url":"https://github.com/sbeaver-netgate/pfsense.git","svn_url":"https://github.com/sbeaver-netgate/pfsense","homepage":"","size":61421,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"bootstrap"}},"base":{"label":"SjonHortensius:bootstrap","ref":"bootstrap","sha":"9a9c8e25ccf5cb9839faabec840f42036d9ef535","user":{"login":"SjonHortensius","id":1684987,"avatar_url":"https://avatars.githubusercontent.com/u/1684987?v=3","gravatar_id":"","url":"https://api.github.com/users/SjonHortensius","html_url":"https://github.com/SjonHortensius","followers_url":"https://api.github.com/users/SjonHortensius/followers","following_url":"https://api.github.com/users/SjonHortensius/following{/other_user}","gists_url":"https://api.github.com/users/SjonHortensius/gists{/gist_id}","starred_url":"https://api.github.com/users/SjonHortensius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SjonHortensius/subscriptions","organizations_url":"https://api.github.com/users/SjonHortensius/orgs","repos_url":"https://api.github.com/users/SjonHortensius/repos","events_url":"https://api.github.com/users/SjonHortensius/events{/privacy}","received_events_url":"https://api.github.com/users/SjonHortensius/received_events","type":"User","site_admin":false},"repo":{"id":28600412,"name":"pfsense","full_name":"SjonHortensius/pfsense","owner":{"login":"SjonHortensius","id":1684987,"avatar_url":"https://avatars.githubusercontent.com/u/1684987?v=3","gravatar_id":"","url":"https://api.github.com/users/SjonHortensius","html_url":"https://github.com/SjonHortensius","followers_url":"https://api.github.com/users/SjonHortensius/followers","following_url":"https://api.github.com/users/SjonHortensius/following{/other_user}","gists_url":"https://api.github.com/users/SjonHortensius/gists{/gist_id}","starred_url":"https://api.github.com/users/SjonHortensius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SjonHortensius/subscriptions","organizations_url":"https://api.github.com/users/SjonHortensius/orgs","repos_url":"https://api.github.com/users/SjonHortensius/repos","events_url":"https://api.github.com/users/SjonHortensius/events{/privacy}","received_events_url":"https://api.github.com/users/SjonHortensius/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/SjonHortensius/pfsense","description":"We are migrating pfSense to bootstrap!","fork":true,"url":"https://api.github.com/repos/SjonHortensius/pfsense","forks_url":"https://api.github.com/repos/SjonHortensius/pfsense/forks","keys_url":"https://api.github.com/repos/SjonHortensius/pfsense/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SjonHortensius/pfsense/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SjonHortensius/pfsense/teams","hooks_url":"https://api.github.com/repos/SjonHortensius/pfsense/hooks","issue_events_url":"https://api.github.com/repos/SjonHortensius/pfsense/issues/events{/number}","events_url":"https://api.github.com/repos/SjonHortensius/pfsense/events","assignees_url":"https://api.github.com/repos/SjonHortensius/pfsense/assignees{/user}","branches_url":"https://api.github.com/repos/SjonHortensius/pfsense/branches{/branch}","tags_url":"https://api.github.com/repos/SjonHortensius/pfsense/tags","blobs_url":"https://api.github.com/repos/SjonHortensius/pfsense/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SjonHortensius/pfsense/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SjonHortensius/pfsense/git/refs{/sha}","trees_url":"https://api.github.com/repos/SjonHortensius/pfsense/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SjonHortensius/pfsense/statuses/{sha}","languages_url":"https://api.github.com/repos/SjonHortensius/pfsense/languages","stargazers_url":"https://api.github.com/repos/SjonHortensius/pfsense/stargazers","contributors_url":"https://api.github.com/repos/SjonHortensius/pfsense/contributors","subscribers_url":"https://api.github.com/repos/SjonHortensius/pfsense/subscribers","subscription_url":"https://api.github.com/repos/SjonHortensius/pfsense/subscription","commits_url":"https://api.github.com/repos/SjonHortensius/pfsense/commits{/sha}","git_commits_url":"https://api.github.com/repos/SjonHortensius/pfsense/git/commits{/sha}","comments_url":"https://api.github.com/repos/SjonHortensius/pfsense/comments{/number}","issue_comment_url":"https://api.github.com/repos/SjonHortensius/pfsense/issues/comments{/number}","contents_url":"https://api.github.com/repos/SjonHortensius/pfsense/contents/{+path}","compare_url":"https://api.github.com/repos/SjonHortensius/pfsense/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SjonHortensius/pfsense/merges","archive_url":"https://api.github.com/repos/SjonHortensius/pfsense/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SjonHortensius/pfsense/downloads","issues_url":"https://api.github.com/repos/SjonHortensius/pfsense/issues{/number}","pulls_url":"https://api.github.com/repos/SjonHortensius/pfsense/pulls{/number}","milestones_url":"https://api.github.com/repos/SjonHortensius/pfsense/milestones{/number}","notifications_url":"https://api.github.com/repos/SjonHortensius/pfsense/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SjonHortensius/pfsense/labels{/name}","releases_url":"https://api.github.com/repos/SjonHortensius/pfsense/releases{/id}","created_at":"2014-12-29T17:40:54Z","updated_at":"2015-05-08T13:58:26Z","pushed_at":"2015-05-08T13:58:25Z","git_url":"git://github.com/SjonHortensius/pfsense.git","ssh_url":"git@github.com:SjonHortensius/pfsense.git","clone_url":"https://github.com/SjonHortensius/pfsense.git","svn_url":"https://github.com/SjonHortensius/pfsense","homepage":"","size":62525,"stargazers_count":9,"watchers_count":9,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":31,"forks":4,"open_issues":31,"watchers":9,"default_branch":"bootstrap"}},"_links":{"self":{"href":"https://api.github.com/repos/SjonHortensius/pfsense/pulls/172"},"html":{"href":"https://github.com/SjonHortensius/pfsense/pull/172"},"issue":{"href":"https://api.github.com/repos/SjonHortensius/pfsense/issues/172"},"comments":{"href":"https://api.github.com/repos/SjonHortensius/pfsense/issues/172/comments"},"review_comments":{"href":"https://api.github.com/repos/SjonHortensius/pfsense/pulls/172/comments"},"review_comment":{"href":"https://api.github.com/repos/SjonHortensius/pfsense/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/SjonHortensius/pfsense/pulls/172/commits"},"statuses":{"href":"https://api.github.com/repos/SjonHortensius/pfsense/statuses/3e19c70439dad5e56bbeadf1a4469bc4d2cec015"}}}}