mirror of
https://github.com/mkschreder/juci.git
synced 2025-01-09 04:19:29 +08:00
Fixed bridge settings
This commit is contained in:
parent
eefa0b06de
commit
0d932bf87b
3
Makefile
3
Makefile
@ -98,6 +98,9 @@ debug: prepare $(UBUS_MODS) $(DIRS-y)
|
||||
grunt
|
||||
./juci-update $(BIN)/www DEBUG
|
||||
|
||||
install:
|
||||
$(CP) $(BIN)/* /
|
||||
|
||||
#node_modules: package.json
|
||||
# npm install
|
||||
|
||||
|
@ -13,6 +13,11 @@
|
||||
<li ng-repeat="err in conn.$info.errors">Error ({{err.subsystem}}): {{err.code}}</li>
|
||||
</ul>
|
||||
</div>
|
||||
<juci-config-lines>
|
||||
<juci-config-line title="{{'Interface Type'|translate}}">
|
||||
<juci-select ng-model="conn.type.value" ng-items="allInterfaceTypes"/>
|
||||
</juci-config-line>
|
||||
</juci-config-lines>
|
||||
<table class="table table-condensed">
|
||||
<tr><td translate>Interface UP:</td><td>{{(conn.$info.up)?"YES":"NO"}}</td></tr>
|
||||
<tr><td translate>Device:</td><td>{{conn.$info.l3_device}}</td></tr>
|
||||
|
@ -16,6 +16,12 @@ JUCI.app
|
||||
$scope.expanded = true;
|
||||
$scope.existingHost = { };
|
||||
|
||||
$scope.allInterfaceTypes = [
|
||||
{ label: "Standard", value: "" },
|
||||
{ label: "AnyWAN", value: "anywan" },
|
||||
{ label: "Bridge", value: "bridge" }
|
||||
];
|
||||
|
||||
$scope.protocolTypes = [
|
||||
{ label: "Static Address", value: "static" },
|
||||
{ label: "DHCP v4", value: "dhcp" },
|
||||
|
@ -19,7 +19,7 @@ JUCI.app
|
||||
function updateDevices(net){
|
||||
if(!net) return;
|
||||
$network.getAdapters().done(function(devs){
|
||||
var devlist = net.ifname.value.split(" ");
|
||||
var devlist = (net.ifname.value != "")?net.ifname.value.split(" "):[];
|
||||
var addable = [];
|
||||
net.$addedDevices = devlist.map(function(dev){
|
||||
return { name: dev };
|
||||
@ -69,20 +69,20 @@ JUCI.app
|
||||
else if(dev == data) return false;
|
||||
return true;
|
||||
}).join(" ");
|
||||
|
||||
if(keep_device) return;
|
||||
|
||||
$scope.connection.ifname.value += " " + data;
|
||||
$scope.connection.ifname.value.split(" ").map(function(dev_name){
|
||||
var dev = devs.find(function(d){ return d.id == dev_name; });
|
||||
|
||||
if(!$scope.doNotMarkBridgedDevices){
|
||||
// mark devies that are part of the bridge as bridged
|
||||
if(dev) dev.bridged = true;
|
||||
}
|
||||
});
|
||||
updateDevices($scope.connection);
|
||||
});
|
||||
|
||||
if(keep_device) return;
|
||||
|
||||
$scope.connection.ifname.value += " " + data;
|
||||
$scope.connection.ifname.value.split(" ").map(function(dev_name){
|
||||
var dev = devs.find(function(d){ return d.id == dev_name; });
|
||||
|
||||
if(!$scope.doNotMarkBridgedDevices){
|
||||
// mark devies that are part of the bridge as bridged
|
||||
if(dev) dev.bridged = true;
|
||||
}
|
||||
});
|
||||
updateDevices($scope.connection);
|
||||
});
|
||||
});
|
||||
}, function () {
|
||||
|
Loading…
Reference in New Issue
Block a user