Fixed status page

This commit is contained in:
Martin Schröder 2015-05-27 12:58:26 +02:00 committed by Martin Schröder
parent 9c175479ce
commit 7fef539190
3 changed files with 14 additions and 16 deletions

View file

@ -3,8 +3,11 @@
<luci-config-heading>{{ 'Network Settings' | translate }}</luci-config-heading>
<luci-config-info>{{ 'settings.network.info' | translate }}</luci-config-info>
<p translate ng-hide="network">Missing uci config boardpanel.</p>
<div ng-repeat="interface in interfaces">
<uci-network-interface-edit ng-model="interface"></uci-network-interface-edit>
</div>
<luci-config-section>
<div ng-repeat="interface in interfaces">
<uci-network-interface-edit ng-model="interface"></uci-network-interface-edit>
</div>
</luci-config-section>
<luci-config-apply></luci-config-apply>
</div>
</luci-layout-with-sidebar>

View file

@ -8,28 +8,25 @@
</span>
</div>
<h3 class="panel-title" style="font-size: 1.5em; padding-top: 0.4em; font-weight: bold; font-family: 'vodafont';">
{{interface.hostname.value}} ({{interface.type.value}})
{{interface[".name"]}}
</h3>
<div style="clear: both;"></div>
</div>
<div class="panel-body " ng-show="expanded" >
<luci-config-lines>
<luci-config-line title="{{'Hostname'|translate}}">
<!--<luci-config-line title="{{'Hostname'|translate}}">
<input class="form-control" ng-model="interface.hostname.value" ></input>
</luci-config-line>
</luci-config-line>-->
<luci-config-line title="{{'DHCP'|translate}}">
<switch ng-model="dhcp.ignore.value" class="green" inverted></switch>
</luci-config-line>
<luci-config-line title="{{'IP Address'|translate}}" ng-show="interface.proto.value == 'static'">
<luci-config-line title="{{'IP Address'|translate}}" ng-show="dhcp.ignore.value">
<input class="form-control" ng-model="interface.ipaddr.value" ></input>
</luci-config-line>
<luci-config-line title="{{'Netmask'|translate}}" ng-show="interface.proto.value == 'static'">
<luci-config-line title="{{'Netmask'|translate}}" ng-show="dhcp.ignore.value">
<input class="form-control" ng-model="interface.netmask.value" ></input>
</luci-config-line>
</luci-config-lines>
</div>
<div class="panel-footer" ng-show="expanded">
<luci-config-apply></luci-config-apply>
</div>
</div>
</div>

View file

@ -22,13 +22,11 @@ JUCI.app
{ name: gettext("Internet"), value: $config.wan_interface },
{ name: gettext("Voice"), value: $config.voice_interface },
{ name: gettext("IPTV"), value: $config.iptv_interface }
]
.filter(function(x){ return x.value != "" })
.forEach(function(x, c){
if(x.interface) {
].forEach(function(x, c){
if(x.value) {
sections.push({
"name": x.name,
"interface": _interfaces.find(function(i){ return i.interface == x.value; })
"interface": _interfaces.find(function(i){ return i.interface === x.value; })
});
}
});