Automatically expand the failing dns records

This commit is contained in:
Johannes Zellner
2017-05-11 16:44:18 +02:00
parent 8de940ae36
commit 393317d114
2 changed files with 13 additions and 2 deletions

View File

@@ -356,12 +356,12 @@
<div class="col-xs-12">
<p class="text-muted">
<i ng-class="outboundPort25.status ? 'fa fa-check-circle text-success' : 'fa fa-exclamation-triangle text-danger'"></i> &nbsp;
<a href="" data-toggle="collapse" data-parent="#accordion" data-target="#collapse_dns_{{ record.value }}">
<a href="" data-toggle="collapse" data-parent="#accordion" data-target="#collapse_dns_port">
Outbound SMTP (Port 25)
</a>
<button class="btn btn-xs btn-default" ng-click="email.refresh()" ng-disabled="email.refreshBusy" ng-show="!outboundPort25.status"><i class="fa fa-refresh" ng-class="{ 'fa-pulse': email.refreshBusy }"></i></button>
</p>
<div id="collapse_dns_{{ record.value }}" class="panel-collapse collapse">
<div id="collapse_dns_port" class="panel-collapse collapse">
<div class="panel-body">
<p><b> {{ outboundPort25.value }} </b> </p>
</div>

View File

@@ -577,6 +577,17 @@ angular.module('Application').controller('SettingsController', ['$scope', '$loca
$scope.expectedDnsRecords = result.dns;
$scope.outboundPort25 = result.outboundPort25;
// open the record details if they are not correct
for (var type in $scope.expectedDnsRecords) {
if (!$scope.expectedDnsRecords[type].status) {
$('#collapse_dns_' + type).collapse('show');
}
}
if (!$scope.outboundPort25.status) {
$('#collapse_dns_port').collapse('show');
}
callback(null);
});
}