2015-03-16 21:03:26 +00:00
< div class = "repository-events-table-element" >
< div class = "co-panel" >
< div class = "co-panel-heading" >
< i class = "fa fa-bell" > < / i > Events and Notifications
< div class = "heading-controls hidden-sm hidden-xs" >
2016-09-14 20:06:52 +00:00
< a href = "/repository/{{ repository.namespace }}/{{ repository.name }}/create-notification" class = "btn btn-primary" >
2015-03-16 21:03:26 +00:00
< i class = "fa fa-plus" > < / i > Create Notification
2016-09-14 20:06:52 +00:00
< / a >
2015-03-16 21:03:26 +00:00
< / div >
< / div >
< div class = "panel-body" >
< div class = "resource-view" resource = "notificationsResource"
error-message="'Could not load repository events'">
< div class = "empty" ng-if = "!notifications.length" >
2015-03-25 19:31:05 +00:00
< div class = "empty-primary-msg" > No notifications have been setup for this repository.< / div >
2015-05-26 22:29:04 +00:00
< div class = "empty-secondary-msg hidden-sm hidden-xs" ng-if = "repository.can_write" >
2015-03-16 21:03:26 +00:00
Click the "Create Notification" button above to add a new notification for a repository event.
< / div >
2015-05-26 22:29:04 +00:00
< div class = "empty-secondary-msg visible-sm visible-xs" ng-if = "repository.can_write" >
2016-09-14 20:06:52 +00:00
< a href = "/repository/{{ repository.namespace }}/{{ repository.name }}/create-notification" > Click here< / a > to add a new notification for a repository event.
2015-04-20 21:42:33 +00:00
< / div >
2015-03-16 21:03:26 +00:00
< / div >
< table class = "co-table permissions" ng-if = "notifications.length" >
< thead >
< tr >
2015-08-17 20:30:15 +00:00
< td > Title< / td >
2015-03-16 21:03:26 +00:00
< td > Event< / td >
< td > Notification< / td >
2017-05-18 21:52:50 +00:00
< td > Enabled< / td >
2015-03-16 21:03:26 +00:00
< td class = "options-col" > < / td >
< / tr >
< / thead >
< tbody >
< tr class = "notification-row" ng-repeat = "notification in notifications" >
2015-08-17 20:30:15 +00:00
< td >
{{ notification.title || '(Untitled)' }}
< / td >
2015-03-16 21:03:26 +00:00
< td >
< span class = "notification-event" >
< i class = "fa fa-lg" ng-class = "getEventInfo(notification).icon" > < / i >
{{ getEventInfo(notification).title }}
< / span >
2015-11-10 20:08:14 +00:00
< ul class = "notification-event-fields" ng-if = "getEventInfo(notification).fields.length" >
2016-11-02 20:35:54 +00:00
< li ng-repeat = "field in getEventInfo(notification).fields" ng-if = "notification.event_config[field.name]" >
2015-11-10 20:08:14 +00:00
{{ field.title }}:
< span ng-switch on = "field.type" >
< span ng-switch-when = "enum" >
{{ findEnumValue(field.values, notification.event_config[field.name]).title }}
< / span >
2016-11-02 20:35:54 +00:00
< code ng-switch-when = "regex" >
{{ notification.event_config[field.name] }}
< / code >
< span ng-switch-default >
{{ notification.event_config[field.name] }}
< / span >
2015-11-10 20:08:14 +00:00
< / span >
< / li >
< / ul >
2015-03-16 21:03:26 +00:00
< / td >
< td >
< span class = "notification-method" >
< i class = "fa fa-lg" ng-class = "getMethodInfo(notification).icon" > < / i >
{{ getMethodInfo(notification).title }}
< / span >
< / td >
2017-05-18 21:52:50 +00:00
< td >
< span ng-if = "notification.number_of_failures >= 3" > Disabled due to 3 failed attempts in a row< / span >
< span ng-if = "notification.number_of_failures < 3" > Enabled< / span >
< / td >
2015-03-16 21:03:26 +00:00
< td >
< span class = "cor-options-menu" >
< span class = "cor-option" option-click = "testNotification(notification)" >
< i class = "fa fa-send" > < / i > Test Notification
< / span >
2015-08-17 20:30:15 +00:00
< span class = "cor-option" option-click = "showNotifyInfo(notification, 'url')"
ng-if="getMethodInfo(notification).id == 'webhook'">
< i class = "fa fa-link" > < / i >
View Webhook URL
< / span >
< span class = "cor-option" option-click = "showNotifyInfo(notification, 'email')"
ng-if="getMethodInfo(notification).id == 'email'">
< i class = "fa fa-envelope" > < / i >
View E-mail Address
< / span >
2015-03-16 21:03:26 +00:00
< span class = "cor-option" option-click = "showWebhookInfo(notification)"
ng-if="getMethodInfo(notification).id == 'webhook'">
< i class = "fa fa-book" > < / i >
Webhook Documentation
< / span >
< span class = "cor-option" option-click = "deleteNotification(notification)" >
< i class = "fa fa-times" > < / i > Delete Notification
< / span >
2017-05-18 21:52:50 +00:00
< span ng-if = "notification.number_of_failures >= 3" class = "cor-option" option-click = "reenableNotification(notification)" >
< i class = "fa fa-adjust" > < / i > Re-enable Notification
< / span >
2015-03-16 21:03:26 +00:00
< / span >
< / td >
< / tr >
< / tbody >
< / table >
< / div >
< / div >
< / div >
2015-03-30 21:55:04 +00:00
< / div >