diff --git a/luciexpress/htdocs/plugins/wifi/pages/wifi.general.js b/luciexpress/htdocs/plugins/wifi/pages/wifi.general.js index 2506d75c0..c9e1ab0c8 100644 --- a/luciexpress/htdocs/plugins/wifi/pages/wifi.general.js +++ b/luciexpress/htdocs/plugins/wifi/pages/wifi.general.js @@ -27,7 +27,6 @@ $juci.module("wifi") window.uci = $uci; $scope.interfaces = $uci.wireless['@wifi-iface']; $scope.status = $uci.wireless.status; - $scope.easybox = $uci.easybox.settings; $scope.$apply(); next(); diff --git a/luciexpress/htdocs/plugins/wifi/pages/wifi.wps.html b/luciexpress/htdocs/plugins/wifi/pages/wifi.wps.html index 7309f62a5..6b0aed006 100644 --- a/luciexpress/htdocs/plugins/wifi/pages/wifi.wps.html +++ b/luciexpress/htdocs/plugins/wifi/pages/wifi.wps.html @@ -8,46 +8,6 @@ - - - - - - -

WPS PBC

-

wifi.wps.pbc.info

- - - - - - - - -

WPS with own PIN

-

wifi.wps.pin.info

- - - - - - - - - - - -

WPS with foreign PIN

-

wifi.wps.otherpin.info

- - - - - - - - -
diff --git a/luciexpress/htdocs/plugins/wifi/pages/wifi.wps.js b/luciexpress/htdocs/plugins/wifi/pages/wifi.wps.js index ff99692da..5a3f727f7 100644 --- a/luciexpress/htdocs/plugins/wifi/pages/wifi.wps.js +++ b/luciexpress/htdocs/plugins/wifi/pages/wifi.wps.js @@ -1,68 +1,10 @@ $juci.module("wifi") .controller("WifiWPSPageCtrl", function($scope, $uci){ - $scope.data = { - userPIN: "" - } - $uci.sync(["easybox", "wireless"]).done(function(){ + $uci.sync(["easybox"]).done(function(){ $scope.easybox = $uci.easybox; - $scope.wireless = $uci.wireless; $scope.$apply(); }).fail(function(err){ console.log("failed to sync config: "+err); }); - $rpc.wps.showpin().done(function(data){ - $scope.generatedPIN = data.pin; - }); - function pair(){ - $scope.showProgress = 1; - $scope.pairState = 'progress'; - $scope.timeRemaining = 60; - $uci.save().done(function(){ - var interval = setInterval(function(){ - $scope.timeRemaining --; - if($scope.timeRemaining == 0){ - clearInterval(interval); - } - }, 1000); - $rpc.wps.pbc().done(function(){ - clearInterval(interval); - $scope.pairState = 'success'; - $scope.$apply(); - setTimeout(function(){ - $scope.showProgress = 0; - $scope.$apply(); - }, 2000); - }).fail(function(){ - clearInterval(interval); - $scope.pairState = 'fail'; - $scope.$apply(); - setTimeout(function(){ - $scope.showProgress = 0; - $scope.$apply(); - }, 2000); - }).always(function(){ - $scope.showProgress = 0; - }); - }); - } - $scope.save = function(){ - $uci.save(); - } - $scope.onPairPBC = function(){ - - pair(); - } - $scope.onPairUserPIN = function(){ - $rpc.wps.stapin({ pin: $scope.data.userPIN }).done(function(data){ - pair(); - }); - } - $scope.onGeneratePIN = function(){ - $rpc.wps.genpin().done(function(data){ - $rpc.wps.setpin({pin: data.pin}).done(function(){ - $scope.generatedPIN = data.pin; - $scope.$apply(); - }); - }); - } + });