diff --git a/static/resources/js/components/details/retrieve-projects.directive.js b/static/resources/js/components/details/retrieve-projects.directive.js index 71d7c0802..8dee4933c 100644 --- a/static/resources/js/components/details/retrieve-projects.directive.js +++ b/static/resources/js/components/details/retrieve-projects.directive.js @@ -6,9 +6,9 @@ .module('harbor.details') .directive('retrieveProjects', retrieveProjects); - RetrieveProjectsController.$inject = ['$scope', 'nameFilter', '$filter', 'ListProjectService', '$location', 'getParameterByName', 'CurrentProjectMemberService', '$window']; + RetrieveProjectsController.$inject = ['$scope', 'nameFilter', '$filter', 'trFilter', 'ListProjectService', '$location', 'getParameterByName', 'CurrentProjectMemberService', '$window']; - function RetrieveProjectsController($scope, nameFilter, $filter, ListProjectService, $location, getParameterByName, CurrentProjectMemberService, $window) { + function RetrieveProjectsController($scope, nameFilter, $filter, trFilter, ListProjectService, $location, getParameterByName, CurrentProjectMemberService, $window) { var vm = this; vm.projectName = ''; @@ -20,7 +20,7 @@ } vm.retrieve = retrieve; - vm.filterInput = ""; + vm.filterInput = ''; vm.selectItem = selectItem; vm.checkProjectMember = checkProjectMember; @@ -78,6 +78,9 @@ } function getProjectFailed(response) { + $scope.$emit('modalTitle', $filter('tr')('error')); + $scope.$emit('modalMessage', $filter('tr')('failed_get_project')); + $scope.$emit('raiseError', true); console.log('Failed to list projects:' + response); } @@ -104,8 +107,13 @@ } function getCurrentProjectMemberFailed(data, status) { - console.log('Use has no member for current project:' + status + ', location.url:' + $location.url()); vm.isProjectMember = false; + + $scope.$emit('modalTitle', $filter('tr')('error')); + $scope.$emit('modalMessage', $filter('tr')('failed_get_project_member')); + $scope.$emit('raiseError', true); + + console.log('Current user has no member for the project:' + status + ', location.url:' + $location.url()); } } diff --git a/static/resources/js/components/log/list-log.directive.html b/static/resources/js/components/log/list-log.directive.html index 71bdc0e13..9ae82ff78 100644 --- a/static/resources/js/components/log/list-log.directive.html +++ b/static/resources/js/components/log/list-log.directive.html @@ -1,4 +1,3 @@ -
diff --git a/static/resources/js/components/log/list-log.directive.js b/static/resources/js/components/log/list-log.directive.js index 5ea5f5aa5..c9fcb3103 100644 --- a/static/resources/js/components/log/list-log.directive.js +++ b/static/resources/js/components/log/list-log.directive.js @@ -49,26 +49,7 @@ }; retrieve(vm.queryParams); }); - - //Error message dialog handler for logs. - $scope.$on('modalTitle', function(e, val) { - vm.modalTitle = val; - }); - - $scope.$on('modalMessage', function(e, val) { - vm.modalMessage = val; - }); - - $scope.$on('raiseError', function(e, val) { - if(val) { - vm.action = function() { - $scope.$broadcast('showDialog', false); - }; - vm.confirmOnly = true; - $scope.$broadcast('showDialog', true); - } - }); - + function search(e) { if(e.op[0] === 'all') { vm.queryParams.keywords = ''; @@ -99,6 +80,7 @@ function listLogComplete(response) { vm.logs = response.data; + vm.isOpen = false; } function listLogFailed(response){ $scope.$emit('modalTitle', $filter('tr')('error')); diff --git a/static/resources/js/components/modal-dialog/modal-dialog.directive.html b/static/resources/js/components/modal-dialog/modal-dialog.directive.html index 9550bc359..eba47a357 100644 --- a/static/resources/js/components/modal-dialog/modal-dialog.directive.html +++ b/static/resources/js/components/modal-dialog/modal-dialog.directive.html @@ -9,7 +9,7 @@
diff --git a/static/resources/js/components/modal-dialog/modal-dialog.directive.js b/static/resources/js/components/modal-dialog/modal-dialog.directive.js index 3ba1dc234..4dc75e797 100644 --- a/static/resources/js/components/modal-dialog/modal-dialog.directive.js +++ b/static/resources/js/components/modal-dialog/modal-dialog.directive.js @@ -56,7 +56,7 @@ } } }); - + scope.$on('showDialog', function(e, val) { if(val) { element.find('#myModal').modal('show'); diff --git a/static/resources/js/components/project-member/list-project-member.directive.html b/static/resources/js/components/project-member/list-project-member.directive.html index 260122088..225079357 100644 --- a/static/resources/js/components/project-member/list-project-member.directive.html +++ b/static/resources/js/components/project-member/list-project-member.directive.html @@ -1,4 +1,3 @@ -
diff --git a/static/resources/js/components/project-member/list-project-member.directive.js b/static/resources/js/components/project-member/list-project-member.directive.js index fc6e31218..6a0788faa 100644 --- a/static/resources/js/components/project-member/list-project-member.directive.js +++ b/static/resources/js/components/project-member/list-project-member.directive.js @@ -30,26 +30,7 @@ vm.projectId = getParameterByName('project_id', $location.absUrl()); vm.retrieve(); }); - - //Error message dialog handler for project members. - $scope.$on('modalTitle', function(e, val) { - vm.modalTitle = val; - }); - - $scope.$on('modalMessage', function(e, val) { - vm.modalMessage = val; - }); - - $scope.$on('raiseError', function(e, val) { - if(val) { - vm.action = function() { - $scope.$broadcast('showDialog', false); - }; - vm.confirmOnly = true; - $scope.$broadcast('showDialog', true); - } - }); - + function search(e) { vm.projectId = e.projectId; vm.username = e.username; diff --git a/static/resources/js/components/repository/list-repository.directive.html b/static/resources/js/components/repository/list-repository.directive.html index f9c0c6b00..e4c626eae 100644 --- a/static/resources/js/components/repository/list-repository.directive.html +++ b/static/resources/js/components/repository/list-repository.directive.html @@ -1,4 +1,3 @@ -
diff --git a/static/resources/js/components/repository/list-repository.directive.js b/static/resources/js/components/repository/list-repository.directive.js index 2f253f8fe..5335f46d1 100644 --- a/static/resources/js/components/repository/list-repository.directive.js +++ b/static/resources/js/components/repository/list-repository.directive.js @@ -61,26 +61,7 @@ $scope.$on('tags', function(e, val) { vm.tags = val; }); - - //Error message dialog handler for repositories. - $scope.$on('modalTitle', function(e, val) { - vm.modalTitle = val; - }); - - $scope.$on('modalMessage', function(e, val) { - vm.modalMessage = val; - }); - - $scope.$on('raiseError', function(e, val) { - if(val) { - vm.action = function() { - $scope.$broadcast('showDialog', false); - }; - vm.confirmOnly = true; - $scope.$broadcast('showDialog', true); - } - }); - + vm.deleteByRepo = deleteByRepo; vm.deleteByTag = deleteByTag; vm.deleteImage = deleteImage; @@ -104,28 +85,40 @@ vm.repoName = repoName; vm.tag = ''; - vm.modalTitle = $filter('tr')('alert_delete_repo_title', [repoName]); - vm.modalMessage = $filter('tr')('alert_delete_repo', [repoName]); - vm.confirmOnly = false; - vm.contentType = 'text/html'; - vm.action = vm.deleteImage; + $scope.$emit('modalTitle', $filter('tr')('alert_delete_repo_title', [repoName])); + $scope.$emit('modalMessage', $filter('tr')('alert_delete_repo', [repoName])); + + var emitInfo = { + 'confirmOnly': false, + 'contentType': 'text/html', + 'action' : vm.deleteImage + }; + + $scope.$emit('raiseInfo', emitInfo); } function deleteByTag() { - vm.modalTitle = $filter('tr')('alert_delete_tag_title', [vm.tag]); + $scope.$emit('modalTitle', $filter('tr')('alert_delete_tag_title', [vm.tag])); var message; - if(vm.tags.length === 1) { + console.log('vm.tagCount:' + angular.toJson(vm.tagCount[vm.repoName])); + if(vm.tagCount[vm.repoName] === 1) { message = $filter('tr')('alert_delete_last_tag', [vm.tag]); }else { message = $filter('tr')('alert_delete_tag', [vm.tag]); } - vm.modalMessage = message; - vm.confirmOnly = false; - vm.contentType = 'text/html'; - vm.action = vm.deleteImage; + $scope.$emit('modalMessage', message); + + var emitInfo = { + 'confirmOnly': false, + 'contentType': 'text/html', + 'action' : vm.deleteImage + }; + + $scope.$emit('raiseInfo', emitInfo); } function deleteImage() { + console.log('Delete image, repoName:' + vm.repoName + ', tag:' + vm.tag); vm.toggleInProgress[vm.repoName + '|' + vm.tag] = true; DeleteRepositoryService(vm.repoName, vm.tag) @@ -136,13 +129,11 @@ function deleteRepositorySuccess(data, status) { vm.toggleInProgress[vm.repoName + '|' + vm.tag] = false; vm.retrieve(); - $scope.$broadcast('showDialog', false); } function deleteRepositoryFailed(data, status) { vm.toggleInProgress[vm.repoName + '|' + vm.tag] = false; - vm.contentType = 'text/plain'; - + $scope.$emit('modalTitle', $filter('tr')('error')); var message; if(status === 401) { diff --git a/static/resources/js/components/repository/list-tag.directive.html b/static/resources/js/components/repository/list-tag.directive.html index 282f3e9e7..94fc5dab0 100644 --- a/static/resources/js/components/repository/list-tag.directive.html +++ b/static/resources/js/components/repository/list-tag.directive.html @@ -14,7 +14,7 @@ - + diff --git a/static/resources/js/components/repository/list-tag.directive.js b/static/resources/js/components/repository/list-tag.directive.js index 1c3827725..0dba11edd 100644 --- a/static/resources/js/components/repository/list-tag.directive.js +++ b/static/resources/js/components/repository/list-tag.directive.js @@ -36,9 +36,11 @@ } function getTagComplete(response) { + vm.tags = response.data; - $scope.$emit('tags', vm.tags); vm.tagCount[vm.repoName] = vm.tags.length; + + $scope.$emit('tags', vm.tags); $scope.$emit('tagCount', vm.tagCount); angular.forEach(vm.tags, function(item) { diff --git a/static/resources/js/components/system-management/destination.directive.html b/static/resources/js/components/system-management/destination.directive.html index 6a58bc922..c811465c0 100644 --- a/static/resources/js/components/system-management/destination.directive.html +++ b/static/resources/js/components/system-management/destination.directive.html @@ -1,4 +1,3 @@ -
diff --git a/static/resources/js/components/system-management/destination.directive.js b/static/resources/js/components/system-management/destination.directive.js index 8636191a2..3cddd7794 100644 --- a/static/resources/js/components/system-management/destination.directive.js +++ b/static/resources/js/components/system-management/destination.directive.js @@ -46,9 +46,17 @@ function confirmToDelete(targetId) { vm.selectedTargetId = targetId; - vm.modalDialogTitle = $filter('tr')('confirm_to_delete_destination_title'); - vm.modalDialogMessage = $filter('tr')('confirm_to_delete_destination'); - $scope.$broadcast('showDialog', true); + + $scope.$emit('modalTitle', $filter('tr')('confirm_to_delete_destination_title')); + $scope.$emit('modalMessage', $filter('tr')('confirm_to_delete_destination')); + + var emitInfo = { + 'confirmOnly': false, + 'contentType': 'text/plain', + 'action': vm.deleteDestination + }; + + $scope.$emit('raiseInfo', emitInfo); } function deleteDestination() { @@ -62,6 +70,9 @@ } function listDestinationFailed(data, status) { + $scope.$emit('modalTitle', $filter('tr')('error')); + $scope.$emit('modalMessage', $filter('tr')('failed_list_destination')); + $scope.$emit('raiseError', true); console.log('Failed list destination:' + data); } @@ -71,8 +82,10 @@ } function deleteDestinationFailed(data, status) { + $scope.$emit('modalTitle', $filter('tr')('error')); + $scope.$emit('modalMessage', $filter('tr')('failed_delete_destination')); + $scope.$emit('raiseError', true); console.log('Failed delete destination.'); - alert($filter('tr')('failed_delete_destination', []) + data); } } diff --git a/static/resources/js/components/system-management/replication.directive.js b/static/resources/js/components/system-management/replication.directive.js index 0b2cd290f..060237e98 100644 --- a/static/resources/js/components/system-management/replication.directive.js +++ b/static/resources/js/components/system-management/replication.directive.js @@ -6,9 +6,9 @@ .module('harbor.system.management') .directive('replication', replication); - ReplicationController.$inject = ['$scope', 'ListReplicationPolicyService', 'ToggleReplicationPolicyService']; + ReplicationController.$inject = ['$scope', 'ListReplicationPolicyService', 'ToggleReplicationPolicyService', '$filter', 'trFilter']; - function ReplicationController($scope, ListReplicationPolicyService, ToggleReplicationPolicyService) { + function ReplicationController($scope, ListReplicationPolicyService, ToggleReplicationPolicyService, $filter, trFilter) { $scope.subsSubPane = 276; @@ -34,6 +34,9 @@ } function listReplicationPolicyFailed(data, status) { + $scope.$emit('modalTitle', $filter('tr')('error')); + $scope.$emit('modalMessage', $filter('tr')('failed_list_replication')); + $scope.$emit('raiseError', true); console.log('Failed list replication policy.'); } @@ -49,6 +52,9 @@ } function toggleReplicationPolicyFailed(data, status) { + $scope.$emit('modalTitle', $filter('tr')('error')); + $scope.$emit('modalMessage', $filter('tr')('failed_toggle_policy')); + $scope.$emit('raiseError', true); console.log('Failed toggle replication policy.'); } diff --git a/static/resources/js/components/system-management/system-management.directive.js b/static/resources/js/components/system-management/system-management.directive.js index 205e854d0..3cb3e2fae 100644 --- a/static/resources/js/components/system-management/system-management.directive.js +++ b/static/resources/js/components/system-management/system-management.directive.js @@ -5,10 +5,15 @@ angular .module('harbor.system.management') .directive('systemManagement', systemManagement); + + SystemManagementController.$inject = ['$scope', '$location']; - function SystemManagementController() { + function SystemManagementController($scope, $location) { var vm = this; vm.target = 'destinations'; + $scope.$on('$locationChangeSuccess', function(e) { + vm.target = $location.path().substring(1); + }); } function systemManagement() { diff --git a/static/resources/js/components/user/list-user.directive.html b/static/resources/js/components/user/list-user.directive.html index 8064bdf69..ea324831c 100644 --- a/static/resources/js/components/user/list-user.directive.html +++ b/static/resources/js/components/user/list-user.directive.html @@ -8,7 +8,6 @@
-
@@ -34,7 +33,7 @@ -    +    diff --git a/static/resources/js/components/user/list-user.directive.js b/static/resources/js/components/user/list-user.directive.js index 73bc82dfb..bb6274bbf 100644 --- a/static/resources/js/components/user/list-user.directive.js +++ b/static/resources/js/components/user/list-user.directive.js @@ -6,9 +6,9 @@ .module('harbor.user') .directive('listUser', listUser); - ListUserController.$inject = ['$scope', 'ListUserService', 'DeleteUserService']; + ListUserController.$inject = ['$scope', 'ListUserService', 'DeleteUserService', '$filter', 'trFilter']; - function ListUserController($scope, ListUserService, DeleteUserService) { + function ListUserController($scope, ListUserService, DeleteUserService, $filter, $trFilter) { $scope.subsSubPane = 226; @@ -34,6 +34,17 @@ function confirmToDelete(userId) { vm.selectedUserId = userId; + + $scope.$emit('modalTitle', $filter('tr')('confirm_to_delete_user_title')); + $scope.$emit('modalMessage', $filter('tr')('confirm_to_delete_user')); + + var emitInfo = { + 'confirmOnly': false, + 'contentType': 'text/plain', + 'action': vm.deleteUser + }; + + $scope.$emit('raiseInfo', emitInfo); } function retrieve() { @@ -48,6 +59,9 @@ } function deleteUserFailed(data, status) { + $scope.$emit('modalTitle', $filter('tr')('error')); + $scope.$emit('modalMessage', $filter('tr')('failed_delete_user')); + $scope.$emit('raiseError', true); console.log('Failed delete user.'); } @@ -56,6 +70,9 @@ } function listUserFailed(data, status) { + $scope.$emit('modalTitle', $filter('tr')('error')); + $scope.$emit('modalMessage', $filter('tr')('failed_list_user')); + $scope.$emit('raiseError', true); console.log('Failed list user:' + data); } } diff --git a/static/resources/js/components/user/toggle-admin.directive.js b/static/resources/js/components/user/toggle-admin.directive.js index 68274cbe7..e9adcbd67 100644 --- a/static/resources/js/components/user/toggle-admin.directive.js +++ b/static/resources/js/components/user/toggle-admin.directive.js @@ -6,9 +6,9 @@ .module('harbor.user') .directive('toggleAdmin', toggleAdmin); - ToggleAdminController.$inject = ['$scope', 'ToggleAdminService']; + ToggleAdminController.$inject = ['$scope', 'ToggleAdminService', '$filter', 'trFilter']; - function ToggleAdminController($scope, ToggleAdminService) { + function ToggleAdminController($scope, ToggleAdminService, $filter, trFilter) { var vm = this; vm.isAdmin = (vm.hasAdminRole == 1) ? true : false; @@ -31,6 +31,9 @@ } function toggleAdminFailed(data, status) { + $scope.$emit('modalTitle', $filter('tr')('error')); + $scope.$emit('modalMessage', $filter('tr')('failed_toggle_admin')); + $scope.$emit('raiseError', true); console.log('Failed toggle admin:' + data); } } diff --git a/static/resources/js/layout/admin-option/admin-option.controller.js b/static/resources/js/layout/admin-option/admin-option.controller.js index c16082d15..7a39ea3ea 100644 --- a/static/resources/js/layout/admin-option/admin-option.controller.js +++ b/static/resources/js/layout/admin-option/admin-option.controller.js @@ -6,22 +6,74 @@ .module('harbor.layout.admin.option') .controller('AdminOptionController', AdminOptionController); - AdminOptionController.$inject = ['$scope']; + AdminOptionController.$inject = ['$scope', '$timeout', '$location']; - function AdminOptionController($scope) { + function AdminOptionController($scope, $timeout, $location) { $scope.subsSubPane = 296; var vm = this; vm.toggle = false; + vm.target = 'users'; vm.toggleAdminOption = toggleAdminOption; + + $scope.$on('$locationChangeSuccess', function(e) { + if($location.path() === '') { + vm.target = 'users'; + vm.toggle = false; + }else{ + vm.target = 'system_management'; + vm.toggle = true; + } + }); + + //Message dialog handler for admin-options. + $scope.$on('modalTitle', function(e, val) { + vm.modalTitle = val; + }); - function toggleAdminOption() { - if(vm.toggle) { - vm.toggle = false; - }else{ - vm.toggle = true; + $scope.$on('modalMessage', function(e, val) { + vm.modalMessage = val; + }); + + $scope.$on('raiseError', function(e, val) { + if(val) { + vm.action = function() { + $scope.$broadcast('showDialog', false); + }; + vm.contentType = 'text/plain'; + vm.confirmOnly = true; + + $timeout(function() { + $scope.$broadcast('showDialog', true); + }, 350); } + }); + + $scope.$on('raiseInfo', function(e, val) { + if(val) { + vm.action = function() { + val.action(); + $scope.$broadcast('showDialog', false); + } + vm.contentType = val.contentType; + vm.confirmOnly = val.confirmOnly; + + $scope.$broadcast('showDialog', true); + } + }); + + + function toggleAdminOption(e) { + switch(e.target) { + case 'users': + vm.toggle = false; + break; + case 'system_management': + vm.toggle = true; + break; + } + vm.target = e.target; } } diff --git a/static/resources/js/layout/details/details.controller.js b/static/resources/js/layout/details/details.controller.js index dc114fbf7..974ae16e3 100644 --- a/static/resources/js/layout/details/details.controller.js +++ b/static/resources/js/layout/details/details.controller.js @@ -6,9 +6,9 @@ .module('harbor.details') .controller('DetailsController', DetailsController); - DetailsController.$inject = ['$scope']; + DetailsController.$inject = ['$scope', '$timeout']; - function DetailsController($scope) { + function DetailsController($scope, $timeout) { var vm = this; vm.publicity = false; @@ -19,6 +19,42 @@ vm.sectionDefaultHeight = {'min-height': '579px'}; + //Message dialog handler for details. + $scope.$on('modalTitle', function(e, val) { + vm.modalTitle = val; + }); + + $scope.$on('modalMessage', function(e, val) { + vm.modalMessage = val; + }); + + $scope.$on('raiseError', function(e, val) { + if(val) { + vm.action = function() { + $scope.$broadcast('showDialog', false); + }; + vm.contentType = 'text/plain'; + vm.confirmOnly = true; + + $timeout(function() { + $scope.$broadcast('showDialog', true); + }, 350); + } + }); + + $scope.$on('raiseInfo', function(e, val) { + if(val) { + vm.action = function() { + val.action(); + $scope.$broadcast('showDialog', false); + } + vm.contentType = val.contentType; + vm.confirmOnly = val.confirmOnly; + + $scope.$broadcast('showDialog', true); + } + }); + function togglePublicity(e) { vm.publicity = e.publicity; } diff --git a/static/resources/js/layout/forgot-password/forgot-password.controller.js b/static/resources/js/layout/forgot-password/forgot-password.controller.js index 5c1c4ab3f..f3b466f0e 100644 --- a/static/resources/js/layout/forgot-password/forgot-password.controller.js +++ b/static/resources/js/layout/forgot-password/forgot-password.controller.js @@ -36,7 +36,7 @@ $scope.$broadcast('showDialog', false); }; vm.contentType = 'text/plain'; - vm.confirmOnly = true; + vm.confirmOnly = true; $scope.$broadcast('showDialog', true); } }); @@ -73,7 +73,7 @@ if(status === 500) { $scope.$emit('modalTitle', $filter('tr')('error')); - $scope.$emit('modalMessage', $filter('tr')('failed_send_mail')); + $scope.$emit('modalMessage', $filter('tr')('failed_send_email')); $scope.$emit('raiseError', true); } console.log('Failed send mail:' + data); diff --git a/static/resources/js/layout/index/index.controller.js b/static/resources/js/layout/index/index.controller.js index e590588bb..600beee48 100644 --- a/static/resources/js/layout/index/index.controller.js +++ b/static/resources/js/layout/index/index.controller.js @@ -6,9 +6,9 @@ .module('harbor.layout.index') .controller('IndexController', IndexController); - IndexController.$inject = ['$scope', '$filter', 'trFilter']; + IndexController.$inject = ['$scope', '$filter', 'trFilter', '$timeout']; - function IndexController($scope, $filter, trFilter) { + function IndexController($scope, $filter, trFilter, $timeout) { $scope.subsHeight = 110; $scope.subsSection = 32; @@ -27,8 +27,8 @@ var indexDesc4 = $filter('tr')('index_desc_4', []); var indexDesc5 = $filter('tr')('index_desc_5', []); - vm.modalTitle = $filter('tr')('harbor_intro_title'); - vm.modalMessage = '

'+ + $scope.$emit('modalTitle', $filter('tr')('harbor_intro_title')); + $scope.$emit('modalMessage', '

'+ indexDesc + '

' + '
    ' + @@ -37,16 +37,18 @@ '
  • ▪︎ ' + indexDesc3 + '
  • ' + '
  • ▪︎ ' + indexDesc4 + '
  • ' + '
  • ▪︎ ' + indexDesc5 + '
  • ' + - '
'; - vm.contentType = 'text/html'; - vm.confirmOnly = true; - $scope.$broadcast('showDialog', true); - vm.action = function() { - $scope.$broadcast('showDialog', false); - } + ''); + var emitInfo = { + 'contentType': 'text/html', + 'confirmOnly': true, + 'action': function() { + $scope.$broadcast('showDialog', false); + } + }; + $scope.$emit('raiseInfo', emitInfo); } - //Error message dialog handler for index. + //Message dialog handler for index. $scope.$on('modalTitle', function(e, val) { vm.modalTitle = val; }); @@ -61,10 +63,27 @@ $scope.$broadcast('showDialog', false); }; vm.contentType = 'text/plain'; - vm.confirmOnly = true; - $scope.$broadcast('showDialog', true); + vm.confirmOnly = true; + + $timeout(function() { + $scope.$broadcast('showDialog', true); + }, 350); } }); + + $scope.$on('raiseInfo', function(e, val) { + if(val) { + vm.action = function() { + val.action(); + $scope.$broadcast('showDialog', false); + } + vm.contentType = val.contentType; + vm.confirmOnly = val.confirmOnly; + + $scope.$broadcast('showDialog', true); + } + }); + } })(); \ No newline at end of file diff --git a/static/resources/js/services/i18n/locale_messages_en-US.js b/static/resources/js/services/i18n/locale_messages_en-US.js index e03ac5a6b..f23a16631 100644 --- a/static/resources/js/services/i18n/locale_messages_en-US.js +++ b/static/resources/js/services/i18n/locale_messages_en-US.js @@ -226,5 +226,11 @@ var locale_messages = { 'failed_reset_pasword': 'Failed reset password.', 'failed_in_search': 'Failed in search.', 'failed_sign_up': 'Failed sign up.', - 'failed_add_user': 'Failed add user' + 'failed_add_user': 'Failed add user.', + 'failed_delete_user': 'Failed delete user.', + 'failed_list_user': 'Failed list user data.', + 'failed_toggle_admin': 'Failed toggle admin user.', + 'failed_list_destination': 'Failed list destinations.', + 'failed_list_replication': 'Failed list replication policies.', + 'failed_toggle_policy': 'Failed toggle replication policy.' }; \ No newline at end of file diff --git a/static/resources/js/services/i18n/locale_messages_zh-CN.js b/static/resources/js/services/i18n/locale_messages_zh-CN.js index 2210969da..696d7bb40 100644 --- a/static/resources/js/services/i18n/locale_messages_zh-CN.js +++ b/static/resources/js/services/i18n/locale_messages_zh-CN.js @@ -222,9 +222,15 @@ var locale_messages = { 'failed_get_stat': '获取统计数据失败。', 'failed_get_top_repo': '获取Top镜像仓库数据失败。', 'failed_get_user_log': '获取用户日志数据失败。', - 'failed_send_mail': '发送邮件失败。', + 'failed_send_email': '发送邮件失败。', 'failed_reset_pasword': '重置邮件失败。', 'failed_in_search': '搜索操作失败。', 'failed_sign_up': '注册用户失败。', - 'failed_add_user': '新增用户失败。' + 'failed_add_user': '新增用户失败。', + 'failed_delete_user': '删除用户失败。', + 'failed_list_user': '获取用户数据失败。', + 'failed_toggle_admin': '切换管理员用户失败。', + 'failed_list_destination': '获取目标数据失败。', + 'failed_list_replication': '获取复制策略数据失败。', + 'failed_toggle_policy': '切换复制策略状态失败。' }; \ No newline at end of file diff --git a/views/admin-options.htm b/views/admin-options.htm index 08cf26a23..00e4a7100 100644 --- a/views/admin-options.htm +++ b/views/admin-options.htm @@ -1,16 +1,17 @@
+
- - + +
diff --git a/views/repository.htm b/views/repository.htm index 219c214ba..7e5f45fe6 100644 --- a/views/repository.htm +++ b/views/repository.htm @@ -1,4 +1,5 @@
+