GUACAMOLE-462: Declare variables with "const" where appropriate.

This commit is contained in:
Michael Jumper
2022-03-03 22:19:20 +00:00
parent 531711493e
commit 357e585edd
6 changed files with 14 additions and 14 deletions

View File

@@ -29,7 +29,7 @@ angular.module('index').filter('resolve', [function resolveFilter() {
*
* @type {!string}
*/
var RESOLVED_VALUE_KEY = '_guac_resolveFilter_resolvedValue';
const RESOLVED_VALUE_KEY = '_guac_resolveFilter_resolvedValue';
return function resolveFilter(promise) {

View File

@@ -77,7 +77,7 @@
*/
angular.module('player').directive('guacPlayer', ['$injector', function guacPlayer($injector) {
var config = {
const config = {
restrict : 'E',
templateUrl : 'app/player/templates/player.html'
};
@@ -172,7 +172,7 @@ angular.module('player').directive('guacPlayer', ['$injector', function guacPlay
* The decimal string representation of the given value, padded
* with leading zeroes up to a minimum length of two digits.
*/
var zeroPad = function zeroPad(value) {
const zeroPad = function zeroPad(value) {
return value > 9 ? value : '0' + value;
};

View File

@@ -50,7 +50,7 @@
*/
angular.module('player').directive('guacPlayerDisplay', [function guacPlayerDisplay() {
var config = {
const config = {
restrict : 'E',
templateUrl : 'app/player/templates/playerDisplay.html'
};
@@ -75,7 +75,7 @@ angular.module('player').directive('guacPlayerDisplay', [function guacPlayerDisp
*
* @type {Element}
*/
var element = $element.find('.guac-player-display')[0];
const element = $element.find('.guac-player-display')[0];
/**
* The element which serves as a container for the root element of the
@@ -83,7 +83,7 @@ angular.module('player').directive('guacPlayerDisplay', [function guacPlayerDisp
*
* @type {HTMLDivElement}
*/
var container = $element.find('.guac-player-display-container')[0];
const container = $element.find('.guac-player-display-container')[0];
/**
* Rescales the Guacamole.Display currently assigned to $scope.display

View File

@@ -50,7 +50,7 @@
*/
angular.module('player').directive('guacPlayerProgressIndicator', [function guacPlayerProgressIndicator() {
var config = {
const config = {
restrict : 'E',
templateUrl : 'app/player/templates/progressIndicator.html'
};

View File

@@ -24,8 +24,8 @@ angular.module('manage').controller('connectionHistoryPlayerController', ['$scop
function connectionHistoryPlayerController($scope, $injector) {
// Required services
var authenticationService = $injector.get('authenticationService');
var $routeParams = $injector.get('$routeParams');
const authenticationService = $injector.get('authenticationService');
const $routeParams = $injector.get('$routeParams');
/**
* The URL of the REST API resource exposing the requested session
@@ -33,7 +33,7 @@ angular.module('manage').controller('connectionHistoryPlayerController', ['$scop
*
* @type {!string}
*/
var recordingURL = 'api/session/data/' + encodeURIComponent($routeParams.dataSource)
const recordingURL = 'api/session/data/' + encodeURIComponent($routeParams.dataSource)
+ '/history/connections/' + encodeURIComponent($routeParams.identifier)
+ '/logs/' + encodeURIComponent($routeParams.name);

View File

@@ -24,11 +24,11 @@ angular.module('settings').factory('ConnectionHistoryEntryWrapper', ['$injector'
function defineConnectionHistoryEntryWrapper($injector) {
// Required types
var ActivityLog = $injector.get('ActivityLog');
var ConnectionHistoryEntry = $injector.get('ConnectionHistoryEntry');
const ActivityLog = $injector.get('ActivityLog');
const ConnectionHistoryEntry = $injector.get('ConnectionHistoryEntry');
// Required services
var $translate = $injector.get('$translate');
const $translate = $injector.get('$translate');
/**
* Wrapper for ConnectionHistoryEntry which adds display-specific
@@ -38,7 +38,7 @@ angular.module('settings').factory('ConnectionHistoryEntryWrapper', ['$injector'
* @param {ConnectionHistoryEntry} historyEntry
* The ConnectionHistoryEntry that should be wrapped.
*/
var ConnectionHistoryEntryWrapper = function ConnectionHistoryEntryWrapper(dataSource, historyEntry) {
const ConnectionHistoryEntryWrapper = function ConnectionHistoryEntryWrapper(dataSource, historyEntry) {
/**
* The wrapped ConnectionHistoryEntry.