<navbar icon="icon-gf icon-gf-alert" title="Alerting" title-url="alerting">
</navbar>

<div class="page-container" >
	<div class="page-header">
		<h1>Notification channels</h1>
    <a href="alerting/notification/new" class="btn btn-success pull-right">
      <i class="fa fa-plus"></i>
      New Channel
    </a>
  </div>

	<table class="grafana-options-table">
		<thead>
			<th style="min-width: 200px"><strong>Name</strong></th>
			<th style="min-width: 100px">Type</th>
			<th style="width: 1%"></th>
		</thead>
		<tr ng-repeat="notification in ctrl.notifications">
			<td>
				<a href="alerting/notification/{{notification.id}}/edit">
					{{notification.name}}
				</a>
			</td>
			<td>
				{{notification.type}}
			</td>
			<td class="text-right">
				<span class="btn btn-secondary btn-small" ng-show="notification.isDefault == true">
					default
				</span>
				<a href="alerting/notification/{{notification.id}}/edit" class="btn btn-inverse btn-small">
					<i class="fa fa-edit"></i>
					edit
				</a>
				<a ng-click="ctrl.deleteNotification(notification.id)" class="btn btn-danger btn-small">
          <i class="fa fa-remove"></i>
        </a>
			</td>
		</tr>
	</table>

</div>
