diff --git a/content/src/main/content/jcr_root/apps/acs-tools/components/vlt-rcp/clientlibs/js/app.js b/content/src/main/content/jcr_root/apps/acs-tools/components/vlt-rcp/clientlibs/js/app.js index c534d7273..babbaab12 100644 --- a/content/src/main/content/jcr_root/apps/acs-tools/components/vlt-rcp/clientlibs/js/app.js +++ b/content/src/main/content/jcr_root/apps/acs-tools/components/vlt-rcp/clientlibs/js/app.js @@ -101,11 +101,10 @@ function ($scope, $http, $timeout, $interval, NotificationsService) { /** * Set the scope values from a task - * Used for the duplicate functionality - * @param {*} task The task to duplicate + * @param {*} task The task to edit */ - $scope.duplicate = function (task) { - $scope.task_id = task.id + "-copy"; // unique + $scope.edit = function (task) { + $scope.task_id = task.id; $scope.task_src = task.src; $scope.task_dst = task.dst; $scope.task_batchSize = task.batchsize; @@ -115,13 +114,18 @@ function ($scope, $http, $timeout, $interval, NotificationsService) { update: task.update, onlyNewer: task.onlyNewer, noOrdering: task.noOrdering, - autoRefresh: false + autoRefresh: false, + useSystemProperties: task.useSystemProperties, + allowSelfSignedCertificate: task.allowSelfSignedCertificate, + disableHostnameVerification: task.disableHostnameVerification }; if (task.excludes) { $scope.excludes = task.excludes.map(function(exclude){ return {value: exclude}; }); + } else if (task.filter) { + $scope.filter = task.filter; } if (task.resumeFrom) { @@ -129,6 +133,18 @@ function ($scope, $http, $timeout, $interval, NotificationsService) { } }; + + /** + * Set the scope values from a task + * Used for the duplicate functionality + * @param {*} task The task to duplicate + */ + $scope.duplicate = function (task) { + $scope.edit(task); + // different task id + $scope.task_id = task.id + "-copy"; // unique + }; + /* * Start task */ @@ -202,6 +218,9 @@ function ($scope, $http, $timeout, $interval, NotificationsService) { "onlyNewer": $scope.checkboxModel.onlyNewer, "recursive": $scope.checkboxModel.recursive, "noOrdering": $scope.checkboxModel.noOrdering, + "useSystemProperties": $scope.checkboxModel.useSystemProperties, + "allowSelfSignedCertificate": $scope.checkboxModel.allowSelfSignedCertificate, + "disableHostnameVerification": $scope.checkboxModel.disableHostnameVerification, "throttle": $scope.task_throttle || 0 }; if ($scope.task_resumeFrom !== "") { @@ -212,8 +231,9 @@ function ($scope, $http, $timeout, $interval, NotificationsService) { cmd.excludes = $scope.excludes.map(function(exclude){ return exclude.value; }); + } else if ($scope.filter && $scope.filter.length > 0) { + cmd.filter = $scope.filter; } - $http .post($scope.app.uri, cmd) .success(function (data, status, headers, config) { @@ -228,10 +248,31 @@ function ($scope, $http, $timeout, $interval, NotificationsService) { }); }; + /* + * Set credentials task + */ + $scope.set_credentials = function (task) { + var cmd = { + "cmd": "set-credentials", + "id": task.id, + "srcCreds": $scope.task_src_username + ":" + $scope.task_src_password + }; + + $http.post($scope.app.uri, cmd). + success(function (data, status, headers, config) { + NotificationsService.add('info', 'INFO', 'Set credentials for task ' + task.id + '.'); + $scope.refresh(); + }). + error(function (data, status, headers, config) { + NotificationsService.add('error', 'ERROR', 'Could not set credentials for task.'); + }); + }; $scope.reset = function() { $scope.task_id = ''; $scope.task_src = 'http://localhost:4502/crx/server/crx.default/jcr:root/content/dam/my-site'; + $scope.task_src_username = ''; + $scope.task_src_password = ''; $scope.task_dst = '/content/dam/my-site'; $scope.task_batchSize = '1024'; $scope.task_throttle = ''; @@ -240,9 +281,13 @@ function ($scope, $http, $timeout, $interval, NotificationsService) { update: false, onlyNewer: false, noOrdering: false, - autoRefresh: false + autoRefresh: false, + useSystemProperties: false, + allowSelfSignedCertificate: false, + disableHostnameVerification: false }; $scope.excludes = []; + $scope.filter = ''; }; $scope.addExclude = function () { diff --git a/content/src/main/content/jcr_root/apps/acs-tools/components/vlt-rcp/content.jsp b/content/src/main/content/jcr_root/apps/acs-tools/components/vlt-rcp/content.jsp index 16e7ee7c1..73ccf7111 100644 --- a/content/src/main/content/jcr_root/apps/acs-tools/components/vlt-rcp/content.jsp +++ b/content/src/main/content/jcr_root/apps/acs-tools/components/vlt-rcp/content.jsp @@ -48,8 +48,8 @@