summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/access-control/controllers/certificate-controller.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/app/access-control/controllers/certificate-controller.js b/app/access-control/controllers/certificate-controller.js
index ad9a060..8a78c05 100644
--- a/app/access-control/controllers/certificate-controller.js
+++ b/app/access-control/controllers/certificate-controller.js
@@ -50,6 +50,24 @@ window.angular && (function(angular) {
})
.finally(function() {
$scope.loading = false;
+ $scope.certificates.sort(function(a, b) {
+ if (a.Name > b.Name) {
+ return 1;
+ }
+ if (a.Name < b.Name) {
+ return -1;
+ }
+ if (a.Issuer.CommonName > b.Issuer.CommonName) {
+ return 1;
+ }
+ if (a.Issuer.CommonName < b.Issuer.CommonName) {
+ return -1;
+ }
+ return (Date.parse(a.ValidNotBefore) >
+ Date.parse(b.ValidNotBefore)) ?
+ 1 :
+ -1;
+ });
});
},
function(error) {
OpenPOWER on IntegriCloud