Better notifications UI

Fixes #369
This commit is contained in:
Joseph Schorr 2015-08-17 16:30:15 -04:00
parent 3f6f5162e8
commit 84276ee945
10 changed files with 89 additions and 12 deletions

View file

@ -64,6 +64,25 @@ angular.module('quay').directive('repositoryEventsTable', function () {
}, ApiService.errorDisplay('Cannot delete notification'));
};
$scope.showNotifyInfo = function(notification, field) {
var dom = document.createElement('input');
dom.setAttribute('type', 'text');
dom.setAttribute('class', 'form-control');
dom.setAttribute('value', notification.config[field]);
dom.setAttribute('readonly', 'readonly');
bootbox.dialog({
'title': (notification.title || 'Notification') + ' ' + field,
'message': dom.outerHTML,
'buttons': {
"Done": {
className: "btn-primary",
callback: function() {}
},
}
});
};
$scope.showWebhookInfo = function(notification) {
var eventId = notification.event;
document.location = 'http://docs.quay.io/guides/notifications.html#webhook_' + eventId;