luci2: rename switch acl group to network as it is going to be shared with other...
authorJo-Philipp Wich <jow@openwrt.org>
Sun, 13 Oct 2013 22:36:23 +0000 (22:36 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Sun, 13 Oct 2013 22:36:23 +0000 (22:36 +0000)
luci2/htdocs/luci2/view/network.switch.js
luci2/share/acl.d/luci2.json
luci2/share/menu.d/network.json

index c1f04d76903efecde1c0c10242a148a81dd1d688..fa431340b84ec59ee060798b84ec69f71bbd65c0 100644 (file)
@@ -60,7 +60,7 @@ L.ui.view.extend({
 
        execute: function() {
                var self = this;
-               L.network.listSwitchNames().then(function(switches) {
+               return L.network.listSwitchNames().then(function(switches) {
                        L.rpc.batch();
 
                        for (var i = 0; i < switches.length; i++)
@@ -69,7 +69,7 @@ L.ui.view.extend({
                        return L.rpc.flush();
                }).then(function(switches) {
                        var m = new L.cbi.Map('network', {
-                               readonly:    !self.options.acls['switch']
+                               readonly:    !self.options.acls.network
                        });
 
                        for (var i = 0; i < switches.length; i++)
index 91f3313912369f1eaacfe1d30cd5767ad61e2804..4d32466e0670b03cb3fbaa617dbe57b260661608 100644 (file)
                }
        },
 
-       "switch": {
-               "description": "Ethernet switch configuration",
-               "read": {
-                       "ubus": {
-                               "luci2.network": [
-                                       "switch_list",
-                                       "switch_info",
-                                       "switch_status"
-                               ]
-                       },
-                       "uci": [
-                               "network"
-                       ]
-               },
-               "write": {
-                       "uci": [
-                               "network"
-                       ]
-               }
-       },
-
        "diagnostics": {
                "description": "Network diagnostic tools",
                "read": {
                                "dhcp"
                        ]
                }
+       },
+
+       "network": {
+               "description": "Network, switch and routing configuration",
+               "read": {
+                       "ubus": {
+                               "luci2.network": [
+                                       "switch_list",
+                                       "switch_info",
+                                       "switch_status"
+                               ]
+                       },
+                       "uci": [
+                               "network"
+                       ]
+               },
+               "write": {
+                       "uci": [
+                               "network"
+                       ]
+               }
        }
 }
index 64921b3c14d34957b40bee48f88e89921f625b8d..e88dff673aff04c41353c371f974e759c3618911 100644 (file)
@@ -5,7 +5,7 @@
     },
     "network/switch": {
         "title": "Switch",
-        "acls": [ "switch" ],
+        "acls": [ "network" ],
         "view": "network/switch",
         "index": 30
     },