juci-netmode: auto-mode select support
authorSukru Senli <sukru.senli@inteno.se>
Mon, 10 Jul 2017 08:46:19 +0000 (10:46 +0200)
committerSukru Senli <sukru.senli@inteno.se>
Mon, 10 Jul 2017 08:46:19 +0000 (10:46 +0200)
plugins/juci-netmode/src/netmode.js
plugins/juci-netmode/src/widgets/overview-netmode.html

index 0d1834c..afda5bd 100644 (file)
@@ -14,6 +14,7 @@ UCI.netmode.$registerSectionType("mode", {
        "dir":          { dvalue: '', type: String },
        "detail":       { dvalue: '', type: String },
        "repeaterready":{ dvalue: 0, type: Number },
+       "automode":     { dvalue: false, type: Boolean },
        "curmode":      { dvalue: '', type: String }
 });
 UCI.netmode.$registerSectionType("netmode", {
index 33004d4..d896f3f 100644 (file)
@@ -1,6 +1,9 @@
 <div>
        <juci-overview-widget title="{{'Profile'|translate}}" icon="juci juci-profile" allow-overflow="true">
                <juci-config-info>{{getExp() || ""}}</juci-config-info>
+               <juci-config-line title="{{'Auto-Mode'|translate}}" ng-show="has_capability('can-select-auto-mode')">
+                       <switch id="enabled" name="enabled" ng-model="setup.automode.value" class="green"></switch>
+               </juci-config-line>
                <div class="col-xs-12 col-sm-8" style="white-space: nowrap;">
                        <juci-select ng-show="allNetmodes.length" title="{{getFullDesc()}}"ng-model="data.selected" ng-items="allNetmodes" ></juci-select>
                        <p ng-show="!allNetmodes.length">{{'No profiles available'|translate}}</p>