mirror of
https://github.com/hak5/nano-tetra-modules.git
synced 2025-10-29 16:58:09 +00:00
updated sitesurvey module(#40)
This commit adds a throbber when a handshake is being downloaded.
This commit is contained in:
committed by
Sebastian Kinne
parent
3c77b1b3a6
commit
f13707821e
@@ -432,6 +432,7 @@ registerController('SiteSurvey_CaptureController', ['$api', '$scope', '$rootScop
|
||||
$scope.capture = [];
|
||||
$scope.captureOutput = 'Loading...';
|
||||
$scope.captureDate = 'Loading...';
|
||||
$scope.throbber = false;
|
||||
|
||||
$scope.refreshCapture = (function() {
|
||||
$api.request({
|
||||
@@ -464,11 +465,13 @@ registerController('SiteSurvey_CaptureController', ['$api', '$scope', '$rootScop
|
||||
});
|
||||
|
||||
$scope.downloadCapture = (function(param) {
|
||||
$scope.throbber = true;
|
||||
$api.request({
|
||||
module: 'SiteSurvey',
|
||||
action: 'downloadCapture',
|
||||
file: param
|
||||
}, function(response) {
|
||||
$scope.throbber = false;
|
||||
if (response.error === undefined) {
|
||||
window.location = '/api/?download=' + response.download;
|
||||
}
|
||||
|
||||
@@ -355,6 +355,7 @@
|
||||
<button type="button" class="btn btn-fixed-length btn-sm btn-default" data-toggle="modal" data-target="#captureModal" ng-click="viewCapture(entry[1])">View</button>
|
||||
<button type="button" class="btn btn-sm btn-default" ng-click="downloadCapture(entry[1])">Download</button>
|
||||
<button type="button" class="btn btn-fixed-length btn-sm btn-danger" ng-click="deleteCapture(entry[1])">Delete</button>
|
||||
  <img src="/img/throbber.gif" ng-show="throbber"/>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user