Merge pull request #785 from wknet123/dev

Fixed duplicated tag requests in repositories of UI.
This commit is contained in:
kun wang 2016-09-10 12:43:26 +08:00 committed by GitHub
commit 4733a00948
4 changed files with 10 additions and 5 deletions

View File

@ -53,7 +53,7 @@
};
vm.page = 1;
vm.pageSize = 20;
vm.pageSize = 15;
$scope.$watch('vm.page', function(current, origin) {
if(current) {

View File

@ -4,7 +4,7 @@
<div class="input-group">
<input type="text" id="txtSearchInput" class="form-control" placeholder="" ng-model="vm.filterInput" value="" size="30">
<span class="input-group-btn">
<button class="btn btn-primary" type="button" ng-click="vm.retrieve()"><span class="glyphicon glyphicon-search"></span></button>
<button class="btn btn-primary" type="button" ng-click="vm.searchRepo()"><span class="glyphicon glyphicon-search"></span></button>
</span>
</div>
</div>

View File

@ -42,9 +42,10 @@
}
}
vm.page = 1;
vm.pageSize = 8;
vm.pageSize = 15;
vm.retrieve = retrieve;
vm.searchRepo = searchRepo;
vm.tagCount = {};
vm.projectId = getParameterByName('project_id', $location.absUrl());
@ -99,13 +100,17 @@
function getRepositoryComplete(response) {
vm.repositories = response.data || [];
vm.totalCount = response.headers('X-Total-Count');
$scope.$broadcast('refreshTags', true);
}
function getRepositoryFailed(response) {
console.log('Failed to list repositories:' + response);
}
function searchRepo() {
$scope.$broadcast('refreshTags', true);
vm.retrieve();
}
function deleteByRepo(repoName) {
vm.repoName = repoName;
vm.tag = '';

View File

@ -30,7 +30,7 @@
vm.publicity = 0;
vm.page = 1;
vm.pageSize = 10;
vm.pageSize = 15;
vm.retrieve = retrieve;
vm.showAddProject = showAddProject;