<topnav icon="fa fa-fw fa-users" title="Organization" subnav="true">
	<ul class="nav">
		<li class="active"><a href="org/apikeys">API Keys</a></li>
	</ul>
</topnav>

<div class="page-container">
	<div class="page">

		<h2>
			API Keys
		</h2>

		<form name="addTokenrForm" class="form-inline tight-form last">
			<ul class="tight-form-list">
				<li class="tight-form-item" style="width: 100px">
					Add a key
				</li>
				<li>
					<input type="text" class="input-xlarge tight-form-input" ng-model='token.name' placeholder="Name"></input>
				</li>
				<li class="tight-form-item">
					Role
				</li>
				<li>
					<select class="input-small tight-form-input" ng-model="token.role" ng-options="r for r in roleTypes"></select>
				</li>
				<li style="float: right">
					<button class="btn btn-success tight-form-btn" ng-click="addToken()">Add</button>
				</li>
				<div class="clearfix"></div>
			</ul>
		</form>

		<table class="grafana-options-table" style="width: 250px">
			<tr>
				<th style="text-align: left">Name</th>
				<th style="text-align: left">Role</th>
				<th></th>
			</tr>
			<tr ng-repeat="t in tokens">
				<td>{{t.name}}</td>
				<td>{{t.role}}</td>
				<td style="width: 1%">
					<a ng-click="removeToken(t.id)" class="btn btn-danger btn-mini">
						<i class="fa fa-remove"></i>
					</a>
				</td>
			</tr>
		</table>
	</div>

</div>


