{"action":"created","comment":{"url":"https://api.github.com/repos/freifunk-gluon/gluon/pulls/comments/29182809","id":29182809,"diff_hunk":"@@ -0,0 +1,90 @@\n+local f, s, o, p, q\n+local uci = luci.model.uci.cursor()\n+\n+--set the heading, button and stuff \n+f = SimpleForm(\"wifi\", \"WLAN-Config\")\n+f.reset = false\n+f.template = \"admin/expertmode\"\n+f.submit = \"Speichern\"\n+\n+-- text, which describes what the package does to the user\n+s = f:section(SimpleSection, nil, [[\n+In diesem Abschnitt hast du die Möglichkeit die SSIDs des Client- und des\n+Mesh-Netzes zu deaktivieren. Bitte lass die SSID des Mesh-Netzes aktiviert, \n+damit sich auch andere Router über dich mit dem Freifunk verbinden können.\n+]])\n+\n+local radios = {}\n+\n+-- look for wifi interfaces and add them to the array\n+uci:foreach('wireless', 'wifi-device',\n+function(s)\n+  table.insert(radios, s['.name'])\n+end\n+)\n+\n+--add a client and mesh checkbox  for each interface\n+for index, radio in ipairs(radios) do\n+  --get the hwmode to seperate 2.4GHz and 5Ghz radios\n+  local hwmode = uci:get('wireless', radio, 'hwmode')\n+\n+  if hwmode == '11g' or hwmode == '11ng' then --if 2.4GHz\n+\n+  p = f:section(SimpleSection, [[2,4GHz Wlan]], nil)\n+    --box for the clientnet\n+    o = p:option(Flag, 'clientbox' .. index, \"Client-Netz aktivieren\")\n+    o.default = (uci:get_bool('wireless', 'client_' .. radio, \"disabled\")) and o.disabled or o.enabled\n+    o.rmempty = false\n+    --box for the meshnet \n+    o = p:option(Flag, 'meshbox' .. index, \"Mesh-Netz aktivieren\")\n+    o.default = (uci:get_bool('wireless', 'mesh_' .. radio, \"disabled\")) and o.disabled or o.enabled\n+    o.rmempty = false\n+\n+  elseif hwmode == '11a' or hwmode == '11na' then --if 5GHz\n+\n+    q = f:section(SimpleSection, [[5GHz Wlan]], nil)\n+\n+    --box for the clientnet\n+    o = q:option(Flag, 'clientbox' .. index, \"Client-Netz aktivieren\")\n+    o.default = (uci:get_bool('wireless', 'client_' .. radio, \"disabled\")) and o.disabled or o.enabled\n+    o.rmempty = false\n+    --box for the meshnet\n+    o = q:option(Flag, 'meshbox' .. index, \"Mesh-Netz aktivieren\")\n+    o.default = (uci:get_bool('wireless', 'mesh_' .. radio, \"disabled\")) and o.disabled or o.enabled\n+    o.rmempty = false\n+\n+  end","path":"package/gluon-luci-wifi-config/files/usr/lib/lua/luci/model/cbi/admin/wifi-config.lua","position":56,"original_position":56,"commit_id":"20e1d43d90e2a98b67f99df5ff693173c7c9c055","original_commit_id":"20e1d43d90e2a98b67f99df5ff693173c7c9c055","user":{"login":"NeoRaider","id":419139,"avatar_url":"https://avatars.githubusercontent.com/u/419139?v=3","gravatar_id":"","url":"https://api.github.com/users/NeoRaider","html_url":"https://github.com/NeoRaider","followers_url":"https://api.github.com/users/NeoRaider/followers","following_url":"https://api.github.com/users/NeoRaider/following{/other_user}","gists_url":"https://api.github.com/users/NeoRaider/gists{/gist_id}","starred_url":"https://api.github.com/users/NeoRaider/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NeoRaider/subscriptions","organizations_url":"https://api.github.com/users/NeoRaider/orgs","repos_url":"https://api.github.com/users/NeoRaider/repos","events_url":"https://api.github.com/users/NeoRaider/events{/privacy}","received_events_url":"https://api.github.com/users/NeoRaider/received_events","type":"User","site_admin":false},"body":"The only things that differs between the 2.4 and 5 GHz branches is the section name, please pull the identical code out of the if block.","created_at":"2015-04-27T19:40:36Z","updated_at":"2015-04-27T19:40:36Z","html_url":"https://github.com/freifunk-gluon/gluon/pull/344#discussion_r29182809","pull_request_url":"https://api.github.com/repos/freifunk-gluon/gluon/pulls/344","_links":{"self":{"href":"https://api.github.com/repos/freifunk-gluon/gluon/pulls/comments/29182809"},"html":{"href":"https://github.com/freifunk-gluon/gluon/pull/344#discussion_r29182809"},"pull_request":{"href":"https://api.github.com/repos/freifunk-gluon/gluon/pulls/344"}}},"pull_request":{"url":"https://api.github.com/repos/freifunk-gluon/gluon/pulls/344","id":33973662,"html_url":"https://github.com/freifunk-gluon/gluon/pull/344","diff_url":"https://github.com/freifunk-gluon/gluon/pull/344.diff","patch_url":"https://github.com/freifunk-gluon/gluon/pull/344.patch","issue_url":"https://api.github.com/repos/freifunk-gluon/gluon/issues/344","number":344,"state":"open","locked":false,"title":"Add the package gluon-luci-wifi-config","user":{"login":"do9xe","id":6275838,"avatar_url":"https://avatars.githubusercontent.com/u/6275838?v=3","gravatar_id":"","url":"https://api.github.com/users/do9xe","html_url":"https://github.com/do9xe","followers_url":"https://api.github.com/users/do9xe/followers","following_url":"https://api.github.com/users/do9xe/following{/other_user}","gists_url":"https://api.github.com/users/do9xe/gists{/gist_id}","starred_url":"https://api.github.com/users/do9xe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/do9xe/subscriptions","organizations_url":"https://api.github.com/users/do9xe/orgs","repos_url":"https://api.github.com/users/do9xe/repos","events_url":"https://api.github.com/users/do9xe/events{/privacy}","received_events_url":"https://api.github.com/users/do9xe/received_events","type":"User","site_admin":false},"body":"This is the new Pull-Request for this Package.\r\nThis ist the old one:\r\nhttps://github.com/freifunk-gluon/packages/pull/93\r\n\r\nI know, that this doesn't survive Updates, but as @tcatm requested I will open a second Pull-Request which fixes the issue and also adds options for the site.conf.","created_at":"2015-04-23T16:39:34Z","updated_at":"2015-04-27T19:40:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"65ec5b3a38c8472f3255a256f80f94f99da5d56a","assignee":null,"milestone":{"url":"https://api.github.com/repos/freifunk-gluon/gluon/milestones/6","html_url":"https://github.com/freifunk-gluon/gluon/milestones/2015.1","labels_url":"https://api.github.com/repos/freifunk-gluon/gluon/milestones/6/labels","id":903686,"number":6,"title":"2015.1","description":"","creator":{"login":"NeoRaider","id":419139,"avatar_url":"https://avatars.githubusercontent.com/u/419139?v=3","gravatar_id":"","url":"https://api.github.com/users/NeoRaider","html_url":"https://github.com/NeoRaider","followers_url":"https://api.github.com/users/NeoRaider/followers","following_url":"https://api.github.com/users/NeoRaider/following{/other_user}","gists_url":"https://api.github.com/users/NeoRaider/gists{/gist_id}","starred_url":"https://api.github.com/users/NeoRaider/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NeoRaider/subscriptions","organizations_url":"https://api.github.com/users/NeoRaider/orgs","repos_url":"https://api.github.com/users/NeoRaider/repos","events_url":"https://api.github.com/users/NeoRaider/events{/privacy}","received_events_url":"https://api.github.com/users/NeoRaider/received_events","type":"User","site_admin":false},"open_issues":12,"closed_issues":24,"state":"open","created_at":"2014-12-14T23:40:59Z","updated_at":"2015-04-27T00:48:38Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/freifunk-gluon/gluon/pulls/344/commits","review_comments_url":"https://api.github.com/repos/freifunk-gluon/gluon/pulls/344/comments","review_comment_url":"https://api.github.com/repos/freifunk-gluon/gluon/pulls/comments{/number}","comments_url":"https://api.github.com/repos/freifunk-gluon/gluon/issues/344/comments","statuses_url":"https://api.github.com/repos/freifunk-gluon/gluon/statuses/20e1d43d90e2a98b67f99df5ff693173c7c9c055","head":{"label":"do9xe:master","ref":"master","sha":"20e1d43d90e2a98b67f99df5ff693173c7c9c055","user":{"login":"do9xe","id":6275838,"avatar_url":"https://avatars.githubusercontent.com/u/6275838?v=3","gravatar_id":"","url":"https://api.github.com/users/do9xe","html_url":"https://github.com/do9xe","followers_url":"https://api.github.com/users/do9xe/followers","following_url":"https://api.github.com/users/do9xe/following{/other_user}","gists_url":"https://api.github.com/users/do9xe/gists{/gist_id}","starred_url":"https://api.github.com/users/do9xe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/do9xe/subscriptions","organizations_url":"https://api.github.com/users/do9xe/orgs","repos_url":"https://api.github.com/users/do9xe/repos","events_url":"https://api.github.com/users/do9xe/events{/privacy}","received_events_url":"https://api.github.com/users/do9xe/received_events","type":"User","site_admin":false},"repo":{"id":34468297,"name":"gluon","full_name":"do9xe/gluon","owner":{"login":"do9xe","id":6275838,"avatar_url":"https://avatars.githubusercontent.com/u/6275838?v=3","gravatar_id":"","url":"https://api.github.com/users/do9xe","html_url":"https://github.com/do9xe","followers_url":"https://api.github.com/users/do9xe/followers","following_url":"https://api.github.com/users/do9xe/following{/other_user}","gists_url":"https://api.github.com/users/do9xe/gists{/gist_id}","starred_url":"https://api.github.com/users/do9xe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/do9xe/subscriptions","organizations_url":"https://api.github.com/users/do9xe/orgs","repos_url":"https://api.github.com/users/do9xe/repos","events_url":"https://api.github.com/users/do9xe/events{/privacy}","received_events_url":"https://api.github.com/users/do9xe/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/do9xe/gluon","description":"This is the main repo of gluon. Start here!","fork":true,"url":"https://api.github.com/repos/do9xe/gluon","forks_url":"https://api.github.com/repos/do9xe/gluon/forks","keys_url":"https://api.github.com/repos/do9xe/gluon/keys{/key_id}","collaborators_url":"https://api.github.com/repos/do9xe/gluon/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/do9xe/gluon/teams","hooks_url":"https://api.github.com/repos/do9xe/gluon/hooks","issue_events_url":"https://api.github.com/repos/do9xe/gluon/issues/events{/number}","events_url":"https://api.github.com/repos/do9xe/gluon/events","assignees_url":"https://api.github.com/repos/do9xe/gluon/assignees{/user}","branches_url":"https://api.github.com/repos/do9xe/gluon/branches{/branch}","tags_url":"https://api.github.com/repos/do9xe/gluon/tags","blobs_url":"https://api.github.com/repos/do9xe/gluon/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/do9xe/gluon/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/do9xe/gluon/git/refs{/sha}","trees_url":"https://api.github.com/repos/do9xe/gluon/git/trees{/sha}","statuses_url":"https://api.github.com/repos/do9xe/gluon/statuses/{sha}","languages_url":"https://api.github.com/repos/do9xe/gluon/languages","stargazers_url":"https://api.github.com/repos/do9xe/gluon/stargazers","contributors_url":"https://api.github.com/repos/do9xe/gluon/contributors","subscribers_url":"https://api.github.com/repos/do9xe/gluon/subscribers","subscription_url":"https://api.github.com/repos/do9xe/gluon/subscription","commits_url":"https://api.github.com/repos/do9xe/gluon/commits{/sha}","git_commits_url":"https://api.github.com/repos/do9xe/gluon/git/commits{/sha}","comments_url":"https://api.github.com/repos/do9xe/gluon/comments{/number}","issue_comment_url":"https://api.github.com/repos/do9xe/gluon/issues/comments{/number}","contents_url":"https://api.github.com/repos/do9xe/gluon/contents/{+path}","compare_url":"https://api.github.com/repos/do9xe/gluon/compare/{base}...{head}","merges_url":"https://api.github.com/repos/do9xe/gluon/merges","archive_url":"https://api.github.com/repos/do9xe/gluon/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/do9xe/gluon/downloads","issues_url":"https://api.github.com/repos/do9xe/gluon/issues{/number}","pulls_url":"https://api.github.com/repos/do9xe/gluon/pulls{/number}","milestones_url":"https://api.github.com/repos/do9xe/gluon/milestones{/number}","notifications_url":"https://api.github.com/repos/do9xe/gluon/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/do9xe/gluon/labels{/name}","releases_url":"https://api.github.com/repos/do9xe/gluon/releases{/id}","created_at":"2015-04-23T16:32:42Z","updated_at":"2015-04-27T07:01:36Z","pushed_at":"2015-04-27T07:01:36Z","git_url":"git://github.com/do9xe/gluon.git","ssh_url":"git@github.com:do9xe/gluon.git","clone_url":"https://github.com/do9xe/gluon.git","svn_url":"https://github.com/do9xe/gluon","homepage":"http://gluon.readthedocs.org/","size":2397,"stargazers_count":0,"watchers_count":0,"language":"C","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":"freifunk-gluon:master","ref":"master","sha":"728a101d8d72307954cf44e40290399fbded5ea4","user":{"login":"freifunk-gluon","id":3431254,"avatar_url":"https://avatars.githubusercontent.com/u/3431254?v=3","gravatar_id":"","url":"https://api.github.com/users/freifunk-gluon","html_url":"https://github.com/freifunk-gluon","followers_url":"https://api.github.com/users/freifunk-gluon/followers","following_url":"https://api.github.com/users/freifunk-gluon/following{/other_user}","gists_url":"https://api.github.com/users/freifunk-gluon/gists{/gist_id}","starred_url":"https://api.github.com/users/freifunk-gluon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/freifunk-gluon/subscriptions","organizations_url":"https://api.github.com/users/freifunk-gluon/orgs","repos_url":"https://api.github.com/users/freifunk-gluon/repos","events_url":"https://api.github.com/users/freifunk-gluon/events{/privacy}","received_events_url":"https://api.github.com/users/freifunk-gluon/received_events","type":"Organization","site_admin":false},"repo":{"id":8141162,"name":"gluon","full_name":"freifunk-gluon/gluon","owner":{"login":"freifunk-gluon","id":3431254,"avatar_url":"https://avatars.githubusercontent.com/u/3431254?v=3","gravatar_id":"","url":"https://api.github.com/users/freifunk-gluon","html_url":"https://github.com/freifunk-gluon","followers_url":"https://api.github.com/users/freifunk-gluon/followers","following_url":"https://api.github.com/users/freifunk-gluon/following{/other_user}","gists_url":"https://api.github.com/users/freifunk-gluon/gists{/gist_id}","starred_url":"https://api.github.com/users/freifunk-gluon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/freifunk-gluon/subscriptions","organizations_url":"https://api.github.com/users/freifunk-gluon/orgs","repos_url":"https://api.github.com/users/freifunk-gluon/repos","events_url":"https://api.github.com/users/freifunk-gluon/events{/privacy}","received_events_url":"https://api.github.com/users/freifunk-gluon/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/freifunk-gluon/gluon","description":"This is the main repo of gluon. Start here!","fork":false,"url":"https://api.github.com/repos/freifunk-gluon/gluon","forks_url":"https://api.github.com/repos/freifunk-gluon/gluon/forks","keys_url":"https://api.github.com/repos/freifunk-gluon/gluon/keys{/key_id}","collaborators_url":"https://api.github.com/repos/freifunk-gluon/gluon/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/freifunk-gluon/gluon/teams","hooks_url":"https://api.github.com/repos/freifunk-gluon/gluon/hooks","issue_events_url":"https://api.github.com/repos/freifunk-gluon/gluon/issues/events{/number}","events_url":"https://api.github.com/repos/freifunk-gluon/gluon/events","assignees_url":"https://api.github.com/repos/freifunk-gluon/gluon/assignees{/user}","branches_url":"https://api.github.com/repos/freifunk-gluon/gluon/branches{/branch}","tags_url":"https://api.github.com/repos/freifunk-gluon/gluon/tags","blobs_url":"https://api.github.com/repos/freifunk-gluon/gluon/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/freifunk-gluon/gluon/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/freifunk-gluon/gluon/git/refs{/sha}","trees_url":"https://api.github.com/repos/freifunk-gluon/gluon/git/trees{/sha}","statuses_url":"https://api.github.com/repos/freifunk-gluon/gluon/statuses/{sha}","languages_url":"https://api.github.com/repos/freifunk-gluon/gluon/languages","stargazers_url":"https://api.github.com/repos/freifunk-gluon/gluon/stargazers","contributors_url":"https://api.github.com/repos/freifunk-gluon/gluon/contributors","subscribers_url":"https://api.github.com/repos/freifunk-gluon/gluon/subscribers","subscription_url":"https://api.github.com/repos/freifunk-gluon/gluon/subscription","commits_url":"https://api.github.com/repos/freifunk-gluon/gluon/commits{/sha}","git_commits_url":"https://api.github.com/repos/freifunk-gluon/gluon/git/commits{/sha}","comments_url":"https://api.github.com/repos/freifunk-gluon/gluon/comments{/number}","issue_comment_url":"https://api.github.com/repos/freifunk-gluon/gluon/issues/comments{/number}","contents_url":"https://api.github.com/repos/freifunk-gluon/gluon/contents/{+path}","compare_url":"https://api.github.com/repos/freifunk-gluon/gluon/compare/{base}...{head}","merges_url":"https://api.github.com/repos/freifunk-gluon/gluon/merges","archive_url":"https://api.github.com/repos/freifunk-gluon/gluon/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/freifunk-gluon/gluon/downloads","issues_url":"https://api.github.com/repos/freifunk-gluon/gluon/issues{/number}","pulls_url":"https://api.github.com/repos/freifunk-gluon/gluon/pulls{/number}","milestones_url":"https://api.github.com/repos/freifunk-gluon/gluon/milestones{/number}","notifications_url":"https://api.github.com/repos/freifunk-gluon/gluon/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/freifunk-gluon/gluon/labels{/name}","releases_url":"https://api.github.com/repos/freifunk-gluon/gluon/releases{/id}","created_at":"2013-02-11T16:08:23Z","updated_at":"2015-04-26T14:09:22Z","pushed_at":"2015-04-27T07:01:36Z","git_url":"git://github.com/freifunk-gluon/gluon.git","ssh_url":"git@github.com:freifunk-gluon/gluon.git","clone_url":"https://github.com/freifunk-gluon/gluon.git","svn_url":"https://github.com/freifunk-gluon/gluon","homepage":"http://gluon.readthedocs.org/","size":7222,"stargazers_count":81,"watchers_count":81,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":84,"mirror_url":null,"open_issues_count":49,"forks":84,"open_issues":49,"watchers":81,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/freifunk-gluon/gluon/pulls/344"},"html":{"href":"https://github.com/freifunk-gluon/gluon/pull/344"},"issue":{"href":"https://api.github.com/repos/freifunk-gluon/gluon/issues/344"},"comments":{"href":"https://api.github.com/repos/freifunk-gluon/gluon/issues/344/comments"},"review_comments":{"href":"https://api.github.com/repos/freifunk-gluon/gluon/pulls/344/comments"},"review_comment":{"href":"https://api.github.com/repos/freifunk-gluon/gluon/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/freifunk-gluon/gluon/pulls/344/commits"},"statuses":{"href":"https://api.github.com/repos/freifunk-gluon/gluon/statuses/20e1d43d90e2a98b67f99df5ff693173c7c9c055"}}}}