<div ng-controller="GraphiteImportCtrl" ng-init="init()">

	<div ng-if="datasources.length > 0">
		<h2 style="margin-top: 30px;">Load dashboard from Graphite-Web</h2>

		<div class="tight-form last">
			<ul class="tight-form-list">
				<li class="tight-form-item" style="width: 150px">
					<strong>Data source</strong>
				</li>
				<li>
					<select type="text" ng-model="options.sourceName" class="input-medium tight-form-input" ng-options="f for f in datasources">
					</select>
				</li>
				<li style="float: right">
					<button class="btn btn-inverse tight-form-btn" ng-click="listAll()">List dashboards</button>
				</li>
				<div class="clearfix"></div>
			</ul>
		</div>

		<table class="grafana-options-table" style="margin-top: 20px;">
			<tr ng-repeat="dash in dashboards">
				<td style="">{{dash.name}}</td>
				<td>
					<button class="btn btn-inverse pull-right" ng-click="import(dash.name)">
						Load
					</button>
				</td>
			</tr>
		</table>

	</div>
</div>
