diff --git a/admin/static/js/app.js b/admin/static/js/app.js index 1d3c626b..7806f5fb 100644 --- a/admin/static/js/app.js +++ b/admin/static/js/app.js @@ -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); diff --git a/admin/static/views/pki.html b/admin/static/views/pki.html index 24c4c1cc..6edc57d1 100644 --- a/admin/static/views/pki.html +++ b/admin/static/views/pki.html @@ -16,7 +16,7 @@ - {{ certificate.id }} + {{ certificate.serial | uppercase }} {{ certificate.creation }} @@ -118,9 +118,9 @@
- -
{{ k }}
-
/CN={{ v.CommonName }}/OU={{ v.OrganizationalUnit }}/O={{ v.Organization }}/L={{ v.Locality }}/P={{ v.Province }}/C={{ v.Country }}/
-
{{ v }}
+ +
{{ k }}
+
/CN={{ v.CommonName }}/OU={{ v.OrganizationalUnit }}/O={{ v.Organization }}/L={{ v.Locality }}/P={{ v.Province }}/C={{ v.Country }}/
+
{{ v }}
diff --git a/admin/static/views/team-edit.html b/admin/static/views/team-edit.html index e2ebec58..c480e823 100644 --- a/admin/static/views/team-edit.html +++ b/admin/static/views/team-edit.html @@ -84,7 +84,7 @@
- {{ cert.id }} + {{ cert.serial | uppercase }} Révoqué