2
0
mirror of https://github.com/VinylDNS/vinyldns synced 2025-08-22 02:02:14 +00:00

Don't refresh when toggling record types during record set search (#937)

* Don't refresh when toggling record types during record set search.
* Update unit test.
This commit is contained in:
Michael Ly 2020-04-23 14:29:18 -05:00 committed by GitHub
parent 5d2f2b87da
commit d13010b289
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 4 deletions

View File

@ -39,6 +39,7 @@
<div class="collapse" id="collapseInstruction">
<div class="well">
<p>The search is based on the fully qualified domain name (FQDN) of a record. You can do an exact match search or fuzzy match to lookup records.</p>
<p>A minimum of two alphanumeric characters for the record name is <i>required</i> for searching.</p>
<p><strong>Examples:</strong>
<ul>
<li>test.example.com. -> test.example.com.</li>

View File

@ -533,7 +533,7 @@ angular.module('controller.records', [])
var recordSets = response.data.recordSets;
recordsPaging = pagingService.nextPageUpdate(recordSets, response.data.nextId, recordsPaging);
if(recordSets.length > 0 ){
if (recordSets.length > 0){
updateRecordDisplay(recordSets);
}
})
@ -555,11 +555,10 @@ angular.module('controller.records', [])
$scope.toggleCheckedRecordType = function(recordType) {
if($scope.selectedRecordTypes.includes(recordType)) {
$scope.selectedRecordTypes.splice($scope.selectedRecordTypes.indexOf(recordType),1)
$scope.selectedRecordTypes.splice($scope.selectedRecordTypes.indexOf(recordType), 1);
} else {
$scope.selectedRecordTypes.push(recordType);
}
return $scope.refreshRecords();
};
/**

View File

@ -389,6 +389,7 @@ describe('Controller: RecordsController', function () {
var expectedSort = "asc";
this.scope.toggleCheckedRecordType("A");
this.scope.refreshRecords();
expect(listRecordSetsByZone.calls.count()).toBe(1);
expect(listRecordSetsByZone.calls.mostRecent().args).toEqual(

View File

@ -80,7 +80,6 @@
} else {
$scope.selectedRecordTypes.push(recordType);
}
return $scope.refreshRecords();
};
function updateRecordDisplay(records) {