2014-07-17 17:32:39 +00:00
|
|
|
<!-- Modal message dialog -->
|
|
|
|
<div class="modal fade" id="createNotificationModal">
|
|
|
|
<div class="modal-dialog">
|
|
|
|
<div class="modal-content">
|
|
|
|
<form id="createForm" name="createForm" ng-submit="createNotification()">
|
|
|
|
<div class="modal-header">
|
|
|
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true" ng-disabled="creating">×</button>
|
|
|
|
<h4 class="modal-title">
|
|
|
|
Create Repository Notification
|
|
|
|
</h4>
|
|
|
|
</div>
|
|
|
|
<div class="modal-body">
|
2014-07-28 18:58:12 +00:00
|
|
|
<!-- Creating spinner -->
|
|
|
|
<div class="quay-spinner" ng-show="status == 'creating' || status == 'authorizing-email'"></div>
|
2014-07-17 17:32:39 +00:00
|
|
|
|
2014-07-28 18:58:12 +00:00
|
|
|
<!-- Authorize e-mail view -->
|
|
|
|
<div ng-show="status == 'authorizing-email-sent'">
|
|
|
|
An e-mail has been sent to <code>{{ currentConfig.email }}</code>. Please click the link contained
|
|
|
|
in the e-mail.
|
|
|
|
<br><br>
|
|
|
|
Waiting... <span class="quay-spinner"></span>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<!-- Authorize e-mail view -->
|
|
|
|
<div ng-show="status == 'unauthorized-email'">
|
|
|
|
The e-mail address <code>{{ currentConfig.email }}</code> has not been authorized to receive
|
|
|
|
notifications from this repository. Please click "Send Authorization E-mail" below to start
|
|
|
|
the authorization process.
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<!-- Create View -->
|
|
|
|
<table style="width: 100%" ng-show="status == ''">
|
2014-07-17 17:32:39 +00:00
|
|
|
<tr>
|
|
|
|
<td style="width: 120px">When this occurs:</td>
|
|
|
|
<td>
|
|
|
|
<div class="dropdown-select" placeholder="'(Notification Event)'" selected-item="currentEvent.title"
|
2014-07-18 20:51:05 +00:00
|
|
|
handle-item-selected="handleEventSelected(datum)" clear-value="clearCounter">
|
2014-07-17 17:32:39 +00:00
|
|
|
<!-- Icons -->
|
|
|
|
<i class="dropdown-select-icon fa fa-lg" ng-class="currentEvent.icon"></i>
|
|
|
|
|
|
|
|
<!-- Dropdown menu -->
|
|
|
|
<ul class="dropdown-select-menu pull-right" role="menu">
|
|
|
|
<li ng-repeat="event in events">
|
|
|
|
<a href="javascript:void(0)" ng-click="setEvent(event)">
|
|
|
|
<i class="fa fa-lg" ng-class="event.icon"></i> {{ event.title }}
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td>Then issue a:</td>
|
|
|
|
<td>
|
|
|
|
<div class="dropdown-select" placeholder="'(Notification Action)'" selected-item="currentMethod.title"
|
2014-07-18 20:51:05 +00:00
|
|
|
handle-item-selected="handleMethodSelected(datum)" clear-value="clearCounter">
|
2014-07-17 17:32:39 +00:00
|
|
|
<!-- Icons -->
|
|
|
|
<i class="dropdown-select-icon fa fa-lg" ng-class="currentMethod.icon"></i>
|
|
|
|
|
|
|
|
<!-- Dropdown menu -->
|
|
|
|
<ul class="dropdown-select-menu pull-right" role="menu">
|
|
|
|
<li ng-repeat="method in methods">
|
|
|
|
<a href="javascript:void(0)" ng-click="setMethod(method)">
|
|
|
|
<i class="fa fa-lg" ng-class="method.icon"></i> {{ method.title }}
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr ng-if="currentMethod.fields.length"><td colspan="2"><hr></td></tr>
|
|
|
|
|
|
|
|
<tr ng-repeat="field in currentMethod.fields">
|
|
|
|
<td>{{ field.title }}:</td>
|
|
|
|
<td>
|
|
|
|
<div ng-switch on="field.type">
|
2014-07-28 18:58:12 +00:00
|
|
|
<span ng-switch-when="email">
|
|
|
|
<input type="email" class="form-control" ng-model="currentConfig[field.name]" required>
|
|
|
|
</span>
|
2014-07-17 17:32:39 +00:00
|
|
|
<input type="url" class="form-control" ng-model="currentConfig[field.name]" ng-switch-when="url" required>
|
|
|
|
<input type="text" class="form-control" ng-model="currentConfig[field.name]" ng-switch-when="string" required>
|
2014-07-18 17:45:08 +00:00
|
|
|
<div class="entity-search" namespace="repository.namespace"
|
|
|
|
placeholder="''"
|
|
|
|
current-entity="currentConfig[field.name]"
|
|
|
|
ng-model="currentConfig[field.name]"
|
2014-07-22 17:39:41 +00:00
|
|
|
allowed-entities="['user', 'team', 'org']"
|
2014-07-18 17:45:08 +00:00
|
|
|
ng-switch-when="entity">
|
2014-07-28 18:58:12 +00:00
|
|
|
</div>
|
2014-07-17 17:32:39 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr ng-if="currentMethod.id == 'webhook'">
|
|
|
|
<td colspan="2">
|
|
|
|
<div class="alert alert-info" style="margin-top: 20px; margin-bottom: 0px">
|
|
|
|
JSON metadata representing the event will be <b>POST</b>ed to the URL.
|
|
|
|
<br><br>
|
|
|
|
The contents for each event can be found in the user guide:
|
2014-07-18 21:00:12 +00:00
|
|
|
<a href="http://docs.quay.io/guides/notifications.html#webhook{{ currentEvent.id ? '_' + currentEvent.id : '' }}"
|
|
|
|
target="_blank">
|
|
|
|
http://docs.quay.io/guides/notifications.html
|
|
|
|
</a>
|
2014-07-17 17:32:39 +00:00
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
2014-07-28 18:58:12 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<!-- Auth e-mail button bar -->
|
|
|
|
<div class="modal-footer" ng-if="status == 'unauthorized-email'">
|
|
|
|
<button type="button" class="btn btn-success" ng-click="sendAuthEmail()">
|
|
|
|
Send Authorization E-mail
|
|
|
|
</button>
|
|
|
|
<button type="button" class="btn btn-default" data-dismiss="modal" ng-disabled="creating">Cancel</button>
|
2014-07-17 17:32:39 +00:00
|
|
|
</div>
|
2014-07-28 18:58:12 +00:00
|
|
|
|
|
|
|
<!-- Normal button bar -->
|
|
|
|
<div class="modal-footer" ng-if="status == '' || status == 'creating'">
|
2014-07-17 17:32:39 +00:00
|
|
|
<button type="submit" class="btn btn-primary"
|
2014-07-22 17:39:41 +00:00
|
|
|
ng-disabled="createForm.$invalid || !currentMethod.id || !currentEvent.id || creating">
|
2014-07-17 17:32:39 +00:00
|
|
|
Create Notification
|
|
|
|
</button>
|
|
|
|
<button type="button" class="btn btn-default" data-dismiss="modal" ng-disabled="creating">Cancel</button>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div><!-- /.modal-content -->
|
|
|
|
</div><!-- /.modal-dialog -->
|
|
|
|
</div><!-- /.modal -->
|