show usb firmware upgrade only if the device has usb port
authorSukru Senli <sukru.senli@inteno.se>
Fri, 26 Jan 2018 20:53:44 +0000 (21:53 +0100)
committerSukru Senli <sukru.senli@inteno.se>
Fri, 26 Jan 2018 20:53:44 +0000 (21:53 +0100)
plugins/juci-sysupgrade/src/pages/settings-upgrade.html
plugins/juci-sysupgrade/src/pages/settings-upgrade.js

index db02693..f92fffb 100644 (file)
@@ -20,7 +20,7 @@
                                </juci-config-line>
                        </juci-config-lines>
                </juci-config-section>
-               <juci-config-section>
+               <juci-config-section ng-show="hasUsb">
                        <h2>{{'USB Firmware Upgrade'|translate}}</h2>
                        <p>{{'settings.upgrade.usb.info'|translate}}</p>
                        <juci-config-lines>
index 7d42707..49dcc5b 100644 (file)
@@ -38,6 +38,11 @@ JUCI.app
                $scope.$apply();
        });
 
+       $rpc.$call("router.system", "info").done(function(data){
+               $scope.hasUsb = data.specs.usb;
+               $scope.$apply();
+       });
+
        function confirmKeep(){
                var deferred = $.Deferred();
                $juciDialog.show(null, {