Move repo notification create to its own page
Also fixes a bug around Slack setup Fixes #1834
This commit is contained in:
parent
58641cbf4f
commit
0dce935c40
12 changed files with 390 additions and 255 deletions
33
static/js/pages/create-repository-notification.js
Normal file
33
static/js/pages/create-repository-notification.js
Normal file
|
@ -0,0 +1,33 @@
|
|||
(function() {
|
||||
/**
|
||||
* Create repository notification page.
|
||||
*/
|
||||
angular.module('quayPages').config(['pages', function(pages) {
|
||||
pages.create('create-repository-notification', 'create-repository-notification.html', CreateRepoNotificationCtrl, {
|
||||
'newLayout': true,
|
||||
'title': 'Create Repo Notification: {{ namespace }}/{{ name }}',
|
||||
'description': 'Create repository notification for repository {{ namespace }}/{{ name }}'
|
||||
})
|
||||
}]);
|
||||
|
||||
function CreateRepoNotificationCtrl($scope, $routeParams, $location, ApiService) {
|
||||
$scope.namespace = $routeParams.namespace;
|
||||
$scope.name = $routeParams.name;
|
||||
|
||||
var loadRepository = function() {
|
||||
var params = {
|
||||
'repository': $scope.namespace + '/' + $scope.name
|
||||
};
|
||||
|
||||
$scope.repositoryResource = ApiService.getRepoAsResource(params).get(function(repo) {
|
||||
$scope.repository = repo;
|
||||
});
|
||||
};
|
||||
|
||||
loadRepository();
|
||||
|
||||
$scope.notificationCreated = function() {
|
||||
$location.url('repository/' + $scope.namespace + '/' + $scope.name + '?tab=settings');
|
||||
};
|
||||
}
|
||||
})();
|
Reference in a new issue