Эх сурвалжийг харах

Add info message in Networking module

DSR! 2 жил өмнө
parent
commit
69c5ecd669

+ 1 - 1
src/pineapple/modules/Networking/js/module.js

@@ -126,8 +126,8 @@ registerController('NetworkingModeController', ['$api', '$scope', '$timeout', fu
             module: 'Networking',
             action: 'getClientInterfaces'
         }, function(response) {
+            $scope.actions = '';
             if (response.error === undefined) {
-                $scope.actions = '';
                 $scope.interfaces = response;
                 $scope.selectedInterface = $scope.interfaces[0];
             }

+ 5 - 2
src/pineapple/modules/Networking/module.html

@@ -149,6 +149,9 @@
                                     </div>
                                 </div>
                                 <img src="img/throbber.gif" ng-show="actions == 'loading'">
+                                <div ng-if="actions == '' && interfaces.length == 0">
+                                    <small class="text-muted">Please note that the Pineapple is designed to be used with several Wi-Fi adapters plugged in, but you currently don't have any of them attached.</small>
+                                </div>
                             </div>
                             <div class="row" ng-hide="actions == '' || actions == 'loading'">
                                 <br/>
@@ -282,7 +285,7 @@
             </div>
         </div>
     </div>
-    
+
     <div class="tab-pane fade" id="networking-config">
         <div class="row">
             <div class="col-md-12 controller" ng-controller="NetworkingRouteController">
@@ -494,7 +497,7 @@
                         <p class="alert well-sm alert-success" ng-show="wirelessUpdated">Config saved successfully</p>
                         <button type="submit" class="btn btn-default" ng-click="saveWirelessConfig()">Save config</button>
                     </div>
-                </div>    
+                </div>
             </div>
         </div>
     </div>