juci-network-netifd: do not show atm-devices or ptm-devices as network physical devic...
authorReidar Cederqvist <reidar.cederqvist@gmail.com>
Wed, 21 Mar 2018 15:18:17 +0000 (16:18 +0100)
committerReidar Cederqvist <reidar.cederqvist@gmail.com>
Wed, 21 Mar 2018 16:27:33 +0000 (17:27 +0100)
plugins/juci-network-netifd/src/widgets/network-connection-type-anywan-edit.js
plugins/juci-network-netifd/src/widgets/network-connection-type-bridge-edit.js
plugins/juci-network-netifd/src/widgets/network-connection-type-none-edit.js

index 79e9c66..742589b 100644 (file)
@@ -38,7 +38,7 @@ JUCI.app
                var net = $scope.connection;
                if(!net) return;
                $network.getAdapters().done(function(adapters){
-                       var filtered = adapters.filter(function(dev){ return dev.device && dev.direction !== "Down"; });
+                       var filtered = adapters.filter(function(dev){ return dev.device && dev.direction !== "Down" && dev.type !== "atm-device" && dev.type !== "ptm-device"; });
                        var aptmap = {};
                        filtered.map(function(apt){ aptmap[apt.device] = apt; });
                        net.$addedDevices = ((net.ifname.value != "")?net.ifname.value.split(" "):[])
index 687581f..7682c82 100644 (file)
@@ -36,7 +36,7 @@ JUCI.app
        function updateDevices(net){
                if(!net) return;
                $network.getAdapters().done(function(adapters){
-                       var filtered = adapters.filter(function(ad){ return ad.type !== "eth-bridge" && ad.device;});
+                       var filtered = adapters.filter(function(ad){ return ad.type !== "eth-bridge" && ad.device && ad.type !== "atm-device" && ad.type !== "ptm-device";});
                        var aptmap = {};
                        if(net.is_lan && net.is_lan.value){
                                filtered = filtered.filter(function(dev){
index c0df7d2..0e96842 100644 (file)
@@ -35,7 +35,7 @@ JUCI.app
                $network.getAdapters().done(function(devs){
                        $network.getNetworks().done(function(nets){
                                $scope.baseDevices = devs.filter(function(dev){
-                                       return dev.type !== "eth-bridge";
+                                       return dev.type !== "eth-bridge" && dev.type !== "atm-device" && dev.type !== "ptm-device";
                                }).map(function(dev){
                                        return { label: dev.name + " (" + dev.device + ")", value: dev.device };
                                });