f9e6110f73
Adds support for creating app repos, viewing app repos and seeing the list of app repos in the Quay UI.
39 lines
1.1 KiB
JavaScript
39 lines
1.1 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, $location, $timeout, ApiService, UserService, AngularPollChannel, ImageLoaderService, CookieService) {
|
|
$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
|
|
};
|
|
|
|
$scope.repositoryResource = ApiService.getRepoAsResource(params).get(function(repo) {
|
|
$scope.repository = repo;
|
|
$scope.viewScope.repository = repo;
|
|
});
|
|
};
|
|
|
|
loadRepository();
|
|
}
|
|
})();
|