juci-network-device: add mtu to network devices. ref #14862
authorReidar Cederqvist <reidar.cederqvist@gmail.com>
Thu, 3 May 2018 10:23:44 +0000 (12:23 +0200)
committerReidar Cederqvist <reidar.cederqvist@gmail.com>
Thu, 3 May 2018 10:23:44 +0000 (12:23 +0200)
plugins/juci-network-device/src/network-device.js
plugins/juci-network-device/src/widgets/network-device-edit.html

index 278e318..c40f64d 100644 (file)
@@ -97,7 +97,8 @@ UCI.network.$registerSectionType("device", {
        "ifname":       { dvalue: "", type: String },
        "vid":          { dvalue: 1, type: Number, validator: UCI.validators.NumberLimitValidator(1, 4096) },
        "priority":     { dvalue: 0, type: Number, validator: UCI.validators.NumberLimitValidator(0, 7) },
-       "name":         { dvalue: "", type: String }
+       "name":         { dvalue: "", type: String },
+       "mtu":          { dvalue: "", type: Number }
 }, function(section){
        if(!section)
                return null;
index b1d48c7..f9af56e 100644 (file)
@@ -23,5 +23,9 @@
                                <span ng-click="conf.manual_name = !conf.manual_name" class="input-group-addon"><i class="fa fa-edit"></i></span>
                        </div>
                </juci-config-line>
+               <juci-config-line title="{{ 'Override MTU' | translate }}">
+                       <input type="number" min="0" class="form-control" ng-model="device.mtu.value" placeholder="{{'auto'|translate}}" />
+               </juci-config-line>
+
        </juci-config-lines>
 </div>