admin: display serial in hexadecimal
This commit is contained in:
parent
14d31737e0
commit
703eaef880
3 changed files with 26 additions and 8 deletions
|
@ -550,6 +550,11 @@ angular.module("FICApp")
|
|||
.controller("PKIController", function($scope, $rootScope, Certificate, CACertificate, Team, $location, $http) {
|
||||
$scope.teams = Team.query();
|
||||
$scope.certificates = Certificate.query();
|
||||
$scope.certificates.$promise.then(function(certificates) {
|
||||
certificates.forEach(function(certificate, cid) {
|
||||
certificate.serial = parseInt(certificate.id).toString(16);
|
||||
});
|
||||
});
|
||||
$scope.ca = CACertificate.get();
|
||||
|
||||
$scope.revoke = function() {
|
||||
|
@ -558,7 +563,11 @@ angular.module("FICApp")
|
|||
Certificate.delete({ serial: targetserial }).$promise.then(
|
||||
function() {
|
||||
$('#revokeModal').modal('hide');
|
||||
$scope.certificates = Certificate.query();
|
||||
$scope.certificates = Certificate.query().$promise.then(function(certificates) {
|
||||
certificates.forEach(function(certificate, cid) {
|
||||
certificate.serial = parseInt(certificate.id).toString(16);
|
||||
});
|
||||
});
|
||||
}, function(response) {
|
||||
$rootScope.newBox('danger', 'An error occurs when trying to associate certificate:', response.data.errmsg);
|
||||
}
|
||||
|
@ -1532,6 +1541,11 @@ angular.module("FICApp")
|
|||
})
|
||||
.controller("TeamCertificatesController", function($scope, $rootScope, TeamCertificate, $routeParams, $http) {
|
||||
$scope.certificates = TeamCertificate.query({ teamId: $routeParams.teamId });
|
||||
$scope.certificates.$promise.then(function(certificates) {
|
||||
certificates.forEach(function(certificate, cid) {
|
||||
certificate.serial = parseInt(certificate.id).toString(16);
|
||||
});
|
||||
});
|
||||
|
||||
$scope.dissociateCertificate = function(certificate) {
|
||||
$http({
|
||||
|
@ -1541,7 +1555,11 @@ angular.module("FICApp")
|
|||
id_team: null
|
||||
}
|
||||
}).then(function(response) {
|
||||
$scope.certificates = TeamCertificate.query({ teamId: $routeParams.teamId });
|
||||
$scope.certificates = TeamCertificate.query({ teamId: $routeParams.teamId }).$promise.then(function(certificates) {
|
||||
certificates.forEach(function(certificate, cid) {
|
||||
certificate.serial = parseInt(certificate.id).toString(16);
|
||||
});
|
||||
});
|
||||
$rootScope.newBox('success', 'Certificate successfully dissociated!');
|
||||
}, function(response) {
|
||||
$rootScope.newBox('danger', 'An error occurs when dissociating certiticate:', response.data.errmsg);
|
||||
|
|
Reference in a new issue