diff --git a/guacamole/src/main/webapp/app/settings/directives/guacSettingsConnectionHistory.js b/guacamole/src/main/webapp/app/settings/directives/guacSettingsConnectionHistory.js index 0290d6046..3e6dbd298 100644 --- a/guacamole/src/main/webapp/app/settings/directives/guacSettingsConnectionHistory.js +++ b/guacamole/src/main/webapp/app/settings/directives/guacSettingsConnectionHistory.js @@ -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. diff --git a/guacamole/src/main/webapp/app/settings/templates/settingsConnectionHistory.html b/guacamole/src/main/webapp/app/settings/templates/settingsConnectionHistory.html index 9a54d6883..718bb004b 100644 --- a/guacamole/src/main/webapp/app/settings/templates/settingsConnectionHistory.html +++ b/guacamole/src/main/webapp/app/settings/templates/settingsConnectionHistory.html @@ -31,7 +31,7 @@ -
{{historyRecord.username}} | {{historyRecord.startDate | date : dateFormat}} | @@ -62,7 +62,7 @@
+
{{'SETTINGS_CONNECTION_HISTORY.INFO_NO_HISTORY' | translate}}