mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 21:27:40 +00:00
GUAC-1193: Show the gear within the history table when search results are loading.
This commit is contained in:
@@ -110,7 +110,20 @@ angular.module('settings').directive('guacSettingsConnectionHistory', [function
|
||||
return $scope.historyRecords !== null
|
||||
&& $scope.dateFormat !== null;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Returns whether the search has completed but contains no history
|
||||
* records. This function will return false if there are history
|
||||
* records in the results OR if the search has not yet completed.
|
||||
*
|
||||
* @returns {Boolean}
|
||||
* true if the search results have been loaded but no history
|
||||
* records are present, false otherwise.
|
||||
*/
|
||||
$scope.isHistoryEmpty = function isHistoryEmpty() {
|
||||
return $scope.isLoaded() && $scope.historyRecords.length === 0;
|
||||
};
|
||||
|
||||
/**
|
||||
* Query the API for the connection record history, filtered by
|
||||
* searchString, and ordered by order.
|
||||
|
@@ -31,7 +31,7 @@
|
||||
</form>
|
||||
|
||||
<!-- Search results -->
|
||||
<div class="results" ng-class="{loading: !isLoaded()}">
|
||||
<div class="results">
|
||||
|
||||
<!-- List of matching history records -->
|
||||
<table class="sorted history-list">
|
||||
@@ -51,7 +51,7 @@
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tbody ng-class="{loading: !isLoaded()}">
|
||||
<tr ng-repeat="historyRecord in historyRecordPage" class="history">
|
||||
<td>{{historyRecord.username}}</td>
|
||||
<td>{{historyRecord.startDate | date : dateFormat}}</td>
|
||||
@@ -62,7 +62,7 @@
|
||||
</table>
|
||||
|
||||
<!-- Text displayed if no history exists -->
|
||||
<p class="placeholder" ng-hide="historyRecordPage.length">
|
||||
<p class="placeholder" ng-show="isHistoryEmpty()">
|
||||
{{'SETTINGS_CONNECTION_HISTORY.INFO_NO_HISTORY' | translate}}
|
||||
</p>
|
||||
|
||||
|
Reference in New Issue
Block a user