Prevents the silencing of notifications that are actively deployed. (#454)

* Renaming 'active' to 'notify' as this is clearer and more aligned to what this value is actually controlling. 'active' is now a property that depends on whether any endpoints were found to be using the certificate. Also added logic for issue #405 disallowing for a certificates' notifications to be silenced when it is actively deployed on an endpoint.

* Adding migration script to alter 'active' column.
This commit is contained in:
kevgliss
2016-10-15 00:12:11 -07:00
committed by GitHub
parent dcb18a57c4
commit c367e4f73f
8 changed files with 42 additions and 14 deletions

View File

@ -189,7 +189,7 @@ angular.module('lemur')
return certificate.customGET('key');
};
CertificateService.updateActive = function (certificate) {
CertificateService.updateNotify = function (certificate) {
return certificate.put();
};

View File

@ -77,8 +77,8 @@ angular.module('lemur')
});
};
$scope.updateActive = function (certificate) {
CertificateService.updateActive(certificate).then(
$scope.updateNotify = function (certificate) {
CertificateService.updateNotify(certificate).then(
function () {
toaster.pop({
type: 'success',

View File

@ -30,10 +30,10 @@
<li><span class="text-muted">{{ certificate.owner }}</span></li>
</ul>
</td>
<td data-title="'Active'" filter="{ 'active': 'select' }" filter-data="getCertificateStatus()">
<td data-title="'Notify'" filter="{ 'notify': 'select' }" filter-data="getCertificateStatus()">
<form>
<switch ng-change="updateActive(certificate)" id="status" name="status"
ng-model="certificate.active" class="green small"></switch>
<switch ng-change="updateNotify(certificate)" id="status" name="status"
ng-model="certificate.notify" class="green small"></switch>
</form>
</td>
<td data-title="'Issuer'" sortable="'issuer'" filter="{ 'issuer': 'text' }">