This repository has been archived on 2020-03-24. You can view files and clone it, but cannot push or open issues or pull requests.
quay/static/js/pages/app-view.js
Kenny Lee Sin Cheong 8e643ce5d9
Repository endpoint tags pagination (#3238)
* endpoint/api/repository: limit the number of tags returned

- Limit the number of tags returned by /api/v1/repository/<ns:repo> to 500.
- Uses the tag history endpoint instead, with an active tag filte.
- Update UI to use tag history endpoint instead.
2018-09-14 15:30:54 -04:00

45 lines
1.2 KiB
JavaScript

(function() {
/**
* Application view page.
*/
angular.module('quayPages').config(['pages', function(pages) {
pages.create('app-view', 'app-view.html', AppViewCtrl, {
'newLayout': true,
'title': '{{ namespace }}/{{ name }}',
'description': 'Application {{ namespace }}/{{ name }}'
});
}]);
function AppViewCtrl($scope, $routeParams, $rootScope, ApiService, UtilService) {
$scope.namespace = $routeParams.namespace;
$scope.name = $routeParams.name;
$scope.viewScope = {};
$scope.settingsShown = 0;
$scope.showSettings = function() {
$scope.settingsShown++;
};
var loadRepository = function() {
var params = {
'repository': $scope.namespace + '/' + $scope.name,
'repo_kind': 'application',
'includeStats': true,
'includeTags': false
};
$scope.repositoryResource = ApiService.getRepoAsResource(params).get(function(repo) {
if (repo != undefined) {
$scope.repository = repo;
$scope.viewScope.repository = repo;
// Update the page description for SEO
$rootScope.description = UtilService.getFirstMarkdownLineAsString(repo.description);
}
});
};
loadRepository();
}
})();