updated sitesurvey module(#40)

This commit adds a throbber when a handshake is being downloaded.
This commit is contained in:
trashbo4t
2018-08-23 17:16:43 -04:00
committed by Sebastian Kinne
parent 3c77b1b3a6
commit f13707821e
2 changed files with 4 additions and 0 deletions

View File

@@ -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;
}

View File

@@ -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>
&nbsp <img src="/img/throbber.gif" ng-show="throbber"/>
</div>
</td>
</tr>