Eliminate subqueries when showing certificates list

This commit is contained in:
Ilya Labun
2019-12-13 14:33:39 +01:00
parent f10121c343
commit 189e8b2725
6 changed files with 45 additions and 4 deletions

View File

@ -371,4 +371,12 @@ angular.module('lemur')
});
});
};
});
})
.controller('CertificateInfoController', function ($scope, CertificateApi) {
$scope.fetchFullCertificate = function (certId) {
CertificateApi.get(certId).then(function (certificate) {
$scope.certificate = certificate;
});
};
})
;

View File

@ -28,6 +28,7 @@ angular.module('lemur')
sorting: {
id: 'desc' // initial sorting
},
short: true,
filter: $scope.filter
}, {
total: 0, // length of data
@ -54,6 +55,7 @@ angular.module('lemur')
sorting: {
id: 'desc' // initial sorting
},
short: true,
filter: $scope.filter
}, {
getData: function ($defer, params) {

View File

@ -71,7 +71,7 @@
</div>
</td>
</tr>
<tr class="warning" ng-if="certificate.toggle" ng-repeat-end>
<tr class="warning" ng-if="certificate.toggle" ng-controller="CertificateInfoController" ng-init="fetchFullCertificate(certificate.id)" ng-repeat-end>
<td colspan="12">
<uib-tabset justified="true" class="col-md-8">
<uib-tab>