FS-10309: [verto_communicator] Add a loader that shows up when check network is called and vanishes when the request is completed.

The button to check network now is disabled when a request is processing.
This commit is contained in:
Neto Guimaraes 2017-05-16 11:26:59 -03:00 committed by Mike Jerris
parent 1aa49b3800
commit b2a692432d
5 changed files with 27 additions and 5 deletions

View File

@ -1735,3 +1735,8 @@ body:-webkit-full-screen #incall .video-footer {
color: rgba(0, 10, 66, 0.84);
background-color: #E8E8E8;
}
#settings .loader {
width: 20px;
height: 20px;
}

View File

@ -124,6 +124,7 @@
"AUTO_SPEED_RES": "Automatically determine speed and resolution settings",
"RECHECK_BANDWIDTH": "Recheck bandwidth before each outgoing call",
"CHECK_NETWORK_SPEED": "Check Network Speed",
"CHECKING_NETWORK_SPEED": "Checking Network Speed",
"VIDEO_QUALITY": "Video quality:",
"MAX_INCOMING_BANDWIDTH": "Max incoming bandwidth:",
"MAX_OUTGOING_BANDWIDTH": "Max outgoing bandwidth:",

View File

@ -124,6 +124,7 @@
"AUTO_SPEED_RES": "Determinar automaticamente velocidade e configurações de resolução",
"RECHECK_BANDWIDTH": "Verificar novamente largura de banda antes de realizar cada chamada",
"CHECK_NETWORK_SPEED": "Verificar velocidade da rede",
"CHECKING_NETWORK_SPEED": "Verificando velocidade da rede",
"VIDEO_QUALITY": "Qualidade do vídeo:",
"MAX_INCOMING_BANDWIDTH": "Largura de banda de entrada máxima:",
"MAX_OUTGOING_BANDWIDTH": "Largura de banda de saída máxima:",

View File

@ -135,11 +135,24 @@
</label>
</div>
<div class="checkbox" ng-show="mydata.autoBand">
<label>
<input type="checkbox" ng-model="mydata.testSpeedJoin">
<span ng-bind="'RECHECK_BANDWIDTH' | translate"></span>
</label>
<div ng-show="mydata.autoBand">
<div class="checkbox">
<label>
<input type="checkbox" ng-model="mydata.testSpeedJoin">
<span ng-bind="'RECHECK_BANDWIDTH' | translate"></span>
</label>
</div>
<a class="btn btn-primary" href="" ng-disabled="isTestingSpeed" ng-click="testSpeed()">
{{ isTestingSpeed ? 'CHECKING_NETWORK_SPEED' : 'CHECK_NETWORK_SPEED' | translate }}
</a>
<div>
<span ng-bind="speedMsg"></span>
<span ng-show="isTestingSpeed">
<img class="loader" src="src/images/ajax-loader.gif"/>
</span>
</div>
</div>
<a ng-show="mydata.autoBand" class="btn btn-primary" href="" ng-click="testSpeed()">{{ 'CHECK_NETWORK_SPEED' | translate }}</a> <span ng-bind="speedMsg"></span>

View File

@ -84,11 +84,13 @@
};
$scope.testSpeed = function() {
$scope.isTestingSpeed = true;
return verto.testSpeed(cb);
function cb(data) {
$scope.mydata.vidQual = storage.data.vidQual;
$scope.speedMsg = 'Up: ' + data.upKPS + ' Down: ' + data.downKPS;
$scope.isTestingSpeed = false;
$scope.$apply();
}
};