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 @@
  • The VLT-RCP endpoint URL must be accessible and not blocked via Dispatcher or another reverse proxy. Note: The VLT RCP servlet - endpoint changed from "/system/jackrabbit/filevault/rcp" to - "/libs/granite/packaging/rcp" in VLT-RCP 3.1.6. + endpoint changed from "/libs/granite/packaging/rcp" to + "/system/jackrabbit/filevault/rcp" in VLT-RCP 3.1.6.
  • @@ -117,6 +117,12 @@ + @@ -136,6 +142,13 @@ ng-click="stop(task)"> + @@ -47,20 +47,22 @@ placeholder="http://localhost:4502/crx/server/-/jcr:root/content/dam/my-site"/> - +
    + name="username" + placeholder="Set again with each edit"/>
    + name="passsword" + placeholder="Set again with each edit"/>
    @@ -68,7 +70,7 @@ name="showpassword" ng-model="showpassword">NoYes - + @@ -104,6 +106,27 @@ name="noOrdering" ng-model="checkboxModel.noOrdering">NoYes
    + + + + NoYes + + + + + NoYes + + + + + NoYes + @@ -142,6 +165,12 @@ + + + diff --git a/content/src/main/content/jcr_root/apps/acs-tools/components/vlt-rcp/includes/set-credentials-modal.jsp b/content/src/main/content/jcr_root/apps/acs-tools/components/vlt-rcp/includes/set-credentials-modal.jsp new file mode 100644 index 000000000..560d54594 --- /dev/null +++ b/content/src/main/content/jcr_root/apps/acs-tools/components/vlt-rcp/includes/set-credentials-modal.jsp @@ -0,0 +1,68 @@ +<%-- + ~ #%L + ~ ACS AEM Tools Bundle + ~ %% + ~ Copyright (C) 2020 Konrad Windszus, Netcentric + ~ %% + ~ Licensed under the Apache License, Version 2.0 (the "License"); + ~ you may not use this file except in compliance with the License. + ~ You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, software + ~ distributed under the License is distributed on an "AS IS" BASIS, + ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + ~ See the License for the specific language governing permissions and + ~ limitations under the License. + ~ #L% + --%> +
    + +
    + +

    Set credentials

    + +
    + +
    + +
    +
    + + +
    + + +
    + +
    + + +
    + + + NoYes + + + +
    +
    +
    + + + +
    \ No newline at end of file