{"action":"opened","number":142,"pull_request":{"url":"https://api.github.com/repos/varnish/vagent2/pulls/142","id":45487443,"html_url":"https://github.com/varnish/vagent2/pull/142","diff_url":"https://github.com/varnish/vagent2/pull/142.diff","patch_url":"https://github.com/varnish/vagent2/pull/142.patch","issue_url":"https://api.github.com/repos/varnish/vagent2/issues/142","number":142,"state":"open","locked":false,"title":"Varnishstat in javascript and a read/only mode","user":{"login":"KristianLyng","id":164636,"avatar_url":"https://avatars.githubusercontent.com/u/164636?v=3","gravatar_id":"","url":"https://api.github.com/users/KristianLyng","html_url":"https://github.com/KristianLyng","followers_url":"https://api.github.com/users/KristianLyng/followers","following_url":"https://api.github.com/users/KristianLyng/following{/other_user}","gists_url":"https://api.github.com/users/KristianLyng/gists{/gist_id}","starred_url":"https://api.github.com/users/KristianLyng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KristianLyng/subscriptions","organizations_url":"https://api.github.com/users/KristianLyng/orgs","repos_url":"https://api.github.com/users/KristianLyng/repos","events_url":"https://api.github.com/users/KristianLyng/events{/privacy}","received_events_url":"https://api.github.com/users/KristianLyng/received_events","type":"User","site_admin":false},"body":"Err, two distinct things, but never mind!\r\n\r\nI've added an -r option to allow varnish-agent to operate in read/only mode where it will reject any requet that isn't a GET, HEAD or OPTIONS request. This will allow it to be used in demo-situations more easily, and also in setups where configuration is administered through other means (puppet/chef/magic). Test cases included.\r\n\r\nThe other (big) part here is the JavaScript version of varnishstat that I've added. It does have some flaws (see comments in varnishstat.js), but is hugely awesome to use. It mimics varnishstat quite well, but does add more fun to the top right box (bandwidth usage, cache size). The sparklines it uses can be a bit CPU intensive, so several tweaks are added to minimize their update frequency. And a toggle button. But they were just too awesome to leave out.\r\n\r\nI'll probably do an other pull request with improvements in a while, but I think this is a good start and would certainly not be an issue to include in a release.","created_at":"2015-09-20T00:53:54Z","updated_at":"2015-09-20T00:53:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/varnish/vagent2/pulls/142/commits","review_comments_url":"https://api.github.com/repos/varnish/vagent2/pulls/142/comments","review_comment_url":"https://api.github.com/repos/varnish/vagent2/pulls/comments{/number}","comments_url":"https://api.github.com/repos/varnish/vagent2/issues/142/comments","statuses_url":"https://api.github.com/repos/varnish/vagent2/statuses/aa362da4769f3eacceec3aa4e73076fe12cf1482","head":{"label":"KristianLyng:master","ref":"master","sha":"aa362da4769f3eacceec3aa4e73076fe12cf1482","user":{"login":"KristianLyng","id":164636,"avatar_url":"https://avatars.githubusercontent.com/u/164636?v=3","gravatar_id":"","url":"https://api.github.com/users/KristianLyng","html_url":"https://github.com/KristianLyng","followers_url":"https://api.github.com/users/KristianLyng/followers","following_url":"https://api.github.com/users/KristianLyng/following{/other_user}","gists_url":"https://api.github.com/users/KristianLyng/gists{/gist_id}","starred_url":"https://api.github.com/users/KristianLyng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KristianLyng/subscriptions","organizations_url":"https://api.github.com/users/KristianLyng/orgs","repos_url":"https://api.github.com/users/KristianLyng/repos","events_url":"https://api.github.com/users/KristianLyng/events{/privacy}","received_events_url":"https://api.github.com/users/KristianLyng/received_events","type":"User","site_admin":false},"repo":{"id":42450820,"name":"vagent2","full_name":"KristianLyng/vagent2","owner":{"login":"KristianLyng","id":164636,"avatar_url":"https://avatars.githubusercontent.com/u/164636?v=3","gravatar_id":"","url":"https://api.github.com/users/KristianLyng","html_url":"https://github.com/KristianLyng","followers_url":"https://api.github.com/users/KristianLyng/followers","following_url":"https://api.github.com/users/KristianLyng/following{/other_user}","gists_url":"https://api.github.com/users/KristianLyng/gists{/gist_id}","starred_url":"https://api.github.com/users/KristianLyng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KristianLyng/subscriptions","organizations_url":"https://api.github.com/users/KristianLyng/orgs","repos_url":"https://api.github.com/users/KristianLyng/repos","events_url":"https://api.github.com/users/KristianLyng/events{/privacy}","received_events_url":"https://api.github.com/users/KristianLyng/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/KristianLyng/vagent2","description":"","fork":true,"url":"https://api.github.com/repos/KristianLyng/vagent2","forks_url":"https://api.github.com/repos/KristianLyng/vagent2/forks","keys_url":"https://api.github.com/repos/KristianLyng/vagent2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/KristianLyng/vagent2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/KristianLyng/vagent2/teams","hooks_url":"https://api.github.com/repos/KristianLyng/vagent2/hooks","issue_events_url":"https://api.github.com/repos/KristianLyng/vagent2/issues/events{/number}","events_url":"https://api.github.com/repos/KristianLyng/vagent2/events","assignees_url":"https://api.github.com/repos/KristianLyng/vagent2/assignees{/user}","branches_url":"https://api.github.com/repos/KristianLyng/vagent2/branches{/branch}","tags_url":"https://api.github.com/repos/KristianLyng/vagent2/tags","blobs_url":"https://api.github.com/repos/KristianLyng/vagent2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/KristianLyng/vagent2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/KristianLyng/vagent2/git/refs{/sha}","trees_url":"https://api.github.com/repos/KristianLyng/vagent2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/KristianLyng/vagent2/statuses/{sha}","languages_url":"https://api.github.com/repos/KristianLyng/vagent2/languages","stargazers_url":"https://api.github.com/repos/KristianLyng/vagent2/stargazers","contributors_url":"https://api.github.com/repos/KristianLyng/vagent2/contributors","subscribers_url":"https://api.github.com/repos/KristianLyng/vagent2/subscribers","subscription_url":"https://api.github.com/repos/KristianLyng/vagent2/subscription","commits_url":"https://api.github.com/repos/KristianLyng/vagent2/commits{/sha}","git_commits_url":"https://api.github.com/repos/KristianLyng/vagent2/git/commits{/sha}","comments_url":"https://api.github.com/repos/KristianLyng/vagent2/comments{/number}","issue_comment_url":"https://api.github.com/repos/KristianLyng/vagent2/issues/comments{/number}","contents_url":"https://api.github.com/repos/KristianLyng/vagent2/contents/{+path}","compare_url":"https://api.github.com/repos/KristianLyng/vagent2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/KristianLyng/vagent2/merges","archive_url":"https://api.github.com/repos/KristianLyng/vagent2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/KristianLyng/vagent2/downloads","issues_url":"https://api.github.com/repos/KristianLyng/vagent2/issues{/number}","pulls_url":"https://api.github.com/repos/KristianLyng/vagent2/pulls{/number}","milestones_url":"https://api.github.com/repos/KristianLyng/vagent2/milestones{/number}","notifications_url":"https://api.github.com/repos/KristianLyng/vagent2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/KristianLyng/vagent2/labels{/name}","releases_url":"https://api.github.com/repos/KristianLyng/vagent2/releases{/id}","created_at":"2015-09-14T13:37:45Z","updated_at":"2015-09-14T13:37:45Z","pushed_at":"2015-09-20T00:43:13Z","git_url":"git://github.com/KristianLyng/vagent2.git","ssh_url":"git@github.com:KristianLyng/vagent2.git","clone_url":"https://github.com/KristianLyng/vagent2.git","svn_url":"https://github.com/KristianLyng/vagent2","homepage":"","size":3236,"stargazers_count":0,"watchers_count":0,"language":"Groff","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":"master"}},"base":{"label":"varnish:master","ref":"master","sha":"941539e0165e031a3a2ff47a84f257c0e33369be","user":{"login":"varnish","id":577014,"avatar_url":"https://avatars.githubusercontent.com/u/577014?v=3","gravatar_id":"","url":"https://api.github.com/users/varnish","html_url":"https://github.com/varnish","followers_url":"https://api.github.com/users/varnish/followers","following_url":"https://api.github.com/users/varnish/following{/other_user}","gists_url":"https://api.github.com/users/varnish/gists{/gist_id}","starred_url":"https://api.github.com/users/varnish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/varnish/subscriptions","organizations_url":"https://api.github.com/users/varnish/orgs","repos_url":"https://api.github.com/users/varnish/repos","events_url":"https://api.github.com/users/varnish/events{/privacy}","received_events_url":"https://api.github.com/users/varnish/received_events","type":"Organization","site_admin":false},"repo":{"id":7241940,"name":"vagent2","full_name":"varnish/vagent2","owner":{"login":"varnish","id":577014,"avatar_url":"https://avatars.githubusercontent.com/u/577014?v=3","gravatar_id":"","url":"https://api.github.com/users/varnish","html_url":"https://github.com/varnish","followers_url":"https://api.github.com/users/varnish/followers","following_url":"https://api.github.com/users/varnish/following{/other_user}","gists_url":"https://api.github.com/users/varnish/gists{/gist_id}","starred_url":"https://api.github.com/users/varnish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/varnish/subscriptions","organizations_url":"https://api.github.com/users/varnish/orgs","repos_url":"https://api.github.com/users/varnish/repos","events_url":"https://api.github.com/users/varnish/events{/privacy}","received_events_url":"https://api.github.com/users/varnish/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/varnish/vagent2","description":"","fork":false,"url":"https://api.github.com/repos/varnish/vagent2","forks_url":"https://api.github.com/repos/varnish/vagent2/forks","keys_url":"https://api.github.com/repos/varnish/vagent2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/varnish/vagent2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/varnish/vagent2/teams","hooks_url":"https://api.github.com/repos/varnish/vagent2/hooks","issue_events_url":"https://api.github.com/repos/varnish/vagent2/issues/events{/number}","events_url":"https://api.github.com/repos/varnish/vagent2/events","assignees_url":"https://api.github.com/repos/varnish/vagent2/assignees{/user}","branches_url":"https://api.github.com/repos/varnish/vagent2/branches{/branch}","tags_url":"https://api.github.com/repos/varnish/vagent2/tags","blobs_url":"https://api.github.com/repos/varnish/vagent2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/varnish/vagent2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/varnish/vagent2/git/refs{/sha}","trees_url":"https://api.github.com/repos/varnish/vagent2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/varnish/vagent2/statuses/{sha}","languages_url":"https://api.github.com/repos/varnish/vagent2/languages","stargazers_url":"https://api.github.com/repos/varnish/vagent2/stargazers","contributors_url":"https://api.github.com/repos/varnish/vagent2/contributors","subscribers_url":"https://api.github.com/repos/varnish/vagent2/subscribers","subscription_url":"https://api.github.com/repos/varnish/vagent2/subscription","commits_url":"https://api.github.com/repos/varnish/vagent2/commits{/sha}","git_commits_url":"https://api.github.com/repos/varnish/vagent2/git/commits{/sha}","comments_url":"https://api.github.com/repos/varnish/vagent2/comments{/number}","issue_comment_url":"https://api.github.com/repos/varnish/vagent2/issues/comments{/number}","contents_url":"https://api.github.com/repos/varnish/vagent2/contents/{+path}","compare_url":"https://api.github.com/repos/varnish/vagent2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/varnish/vagent2/merges","archive_url":"https://api.github.com/repos/varnish/vagent2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/varnish/vagent2/downloads","issues_url":"https://api.github.com/repos/varnish/vagent2/issues{/number}","pulls_url":"https://api.github.com/repos/varnish/vagent2/pulls{/number}","milestones_url":"https://api.github.com/repos/varnish/vagent2/milestones{/number}","notifications_url":"https://api.github.com/repos/varnish/vagent2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/varnish/vagent2/labels{/name}","releases_url":"https://api.github.com/repos/varnish/vagent2/releases{/id}","created_at":"2012-12-19T14:42:09Z","updated_at":"2015-09-18T16:21:57Z","pushed_at":"2015-09-20T00:53:54Z","git_url":"git://github.com/varnish/vagent2.git","ssh_url":"git@github.com:varnish/vagent2.git","clone_url":"https://github.com/varnish/vagent2.git","svn_url":"https://github.com/varnish/vagent2","homepage":"","size":4800,"stargazers_count":180,"watchers_count":180,"language":"Groff","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":32,"mirror_url":null,"open_issues_count":33,"forks":32,"open_issues":33,"watchers":180,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/varnish/vagent2/pulls/142"},"html":{"href":"https://github.com/varnish/vagent2/pull/142"},"issue":{"href":"https://api.github.com/repos/varnish/vagent2/issues/142"},"comments":{"href":"https://api.github.com/repos/varnish/vagent2/issues/142/comments"},"review_comments":{"href":"https://api.github.com/repos/varnish/vagent2/pulls/142/comments"},"review_comment":{"href":"https://api.github.com/repos/varnish/vagent2/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/varnish/vagent2/pulls/142/commits"},"statuses":{"href":"https://api.github.com/repos/varnish/vagent2/statuses/aa362da4769f3eacceec3aa4e73076fe12cf1482"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":8,"additions":741,"deletions":9,"changed_files":14}}