Fix build notification ref filtering setup in UI

Fixes #2067

This change fixes the code that sends the filtering config to the server on notification creation, as well as fixing the display of the filtering in the repository events table
This commit is contained in:
Joseph Schorr 2016-11-02 16:35:54 -04:00
parent a3c540efcb
commit e0494a8f0b
2 changed files with 8 additions and 2 deletions

View file

@ -41,7 +41,7 @@
<!-- Regular expression --> <!-- Regular expression -->
<div ng-switch-when="regex"> <div ng-switch-when="regex">
<div class="regex-editor" placeholder="{{field.placeholder || '' }}" <div class="regex-editor" placeholder="{{field.placeholder || '' }}"
binding="currentConfig[field.name]" optional="field.optional"></div> binding="currentEventConfig[field.name]" optional="field.optional"></div>
</div> </div>
<!-- Value description --> <!-- Value description -->

View file

@ -46,12 +46,18 @@
</span> </span>
<ul class="notification-event-fields" ng-if="getEventInfo(notification).fields.length"> <ul class="notification-event-fields" ng-if="getEventInfo(notification).fields.length">
<li ng-repeat="field in getEventInfo(notification).fields"> <li ng-repeat="field in getEventInfo(notification).fields" ng-if="notification.event_config[field.name]">
{{ field.title }}: {{ field.title }}:
<span ng-switch on="field.type"> <span ng-switch on="field.type">
<span ng-switch-when="enum"> <span ng-switch-when="enum">
{{ findEnumValue(field.values, notification.event_config[field.name]).title }} {{ findEnumValue(field.values, notification.event_config[field.name]).title }}
</span> </span>
<code ng-switch-when="regex">
{{ notification.event_config[field.name] }}
</code>
<span ng-switch-default>
{{ notification.event_config[field.name] }}
</span>
</span> </span>
</li> </li>
</ul> </ul>