Merge pull request #4119 from grafana/select-form-updates

Select form updates
This commit is contained in:
Torkel Ödegaard 2016-02-22 21:02:46 +01:00
commit 18fcb23371
5 changed files with 17 additions and 7 deletions

View File

@ -73,14 +73,18 @@
</div> </div>
<div class="gf-form"> <div class="gf-form">
<span class="gf-form-label max-width-10">Datasource</span> <span class="gf-form-label max-width-10">Datasource</span>
<div class="gf-form-select-wrapper">
<select class="gf-form-input gf-size-auto" ng-model="currentAnnotation.datasource" ng-options="f.name as f.name for f in datasources" ng-change="datasourceChanged()"></select> <select class="gf-form-input gf-size-auto" ng-model="currentAnnotation.datasource" ng-options="f.name as f.name for f in datasources" ng-change="datasourceChanged()"></select>
</div> </div>
</div> </div>
</div>
<div class="gf-form-inline"> <div class="gf-form-inline">
<div class="gf-form gf-size-max-xl"> <div class="gf-form gf-size-max-xl">
<span class="gf-form-label width-10">Icon size</span> <span class="gf-form-label width-10">Icon size</span>
<div class="gf-form-select-wrapper">
<select class="gf-form-input gf-size-md" ng-model="currentAnnotation.iconSize" ng-options="f for f in [7,8,9,10,13,15,17,20,25,30]"></select> <select class="gf-form-input gf-size-md" ng-model="currentAnnotation.iconSize" ng-options="f for f in [7,8,9,10,13,15,17,20,25,30]"></select>
</div> </div>
</div>
<div class="gf-form"> <div class="gf-form">
<label class="gf-form-label"> <label class="gf-form-label">
<span>Icon color</span> <span>Icon color</span>

View File

@ -9,8 +9,10 @@
<strong>Data source</strong> <strong>Data source</strong>
</li> </li>
<li> <li>
<div class="gf-form-select-wrapper">
<select type="text" ng-model="options.sourceName" class="input-medium tight-form-input" ng-options="f for f in datasources"> <select type="text" ng-model="options.sourceName" class="input-medium tight-form-input" ng-options="f for f in datasources">
</select> </select>
</div>
</li> </li>
<li style="float: right"> <li style="float: right">
<button class="btn btn-inverse tight-form-btn" ng-click="listAll()">List dashboards</button> <button class="btn btn-inverse tight-form-btn" ng-click="listAll()">List dashboards</button>

View File

@ -24,7 +24,9 @@
<div class="gf-form"> <div class="gf-form">
<div class="gf-form-label">Dashboard source</div> <div class="gf-form-label">Dashboard source</div>
<div> <div>
<select type="text" ng-model="sourceName" class="input-medium tight-form-input" ng-options="f for f in datasources"></select> <div class="gf-form-select-wrapper">
<select class="gf-form-input gf-size-auto" ng-model="sourceName" ng-options="f for f in datasources"></select>
</div>
</div> </div>
<div class="gf-form-btn"> <div class="gf-form-btn">
<button class="btn btn-success" ng-click="startImport()">Import</button> <button class="btn btn-success" ng-click="startImport()">Import</button>

View File

@ -24,8 +24,10 @@
<span class="gf-form-label width-7"> <span class="gf-form-label width-7">
Access <tip>Direct = url is used directly from browser, Proxy = Grafana backend will proxy the request</tip> Access <tip>Direct = url is used directly from browser, Proxy = Grafana backend will proxy the request</tip>
</span> </span>
<div class="gf-form-select-wrapper">
<select class="gf-form-input gf-size-auto" ng-model="current.access" ng-options="f for f in ['direct', 'proxy']"></select> <select class="gf-form-input gf-size-auto" ng-model="current.access" ng-options="f for f in ['direct', 'proxy']"></select>
</div> </div>
</div>
<div class="gf-form"> <div class="gf-form">
<span class="gf-form-label width-7"> <span class="gf-form-label width-7">

View File

@ -107,7 +107,7 @@
<div class="gf-form-button-row"> <div class="gf-form-button-row">
<a class="btn btn-success " ng-show="ctrl.isNew()" <a class="btn btn-success " ng-show="ctrl.isNew()"
ng-disabled="ctrl.playlistEditForm.$invalid || ctrl.isPlaylistEmpty()" ng-disabled="ctrl.playlistEditForm.$invalid || ctrl.isPlaylistEmpty()"
ng-click="ctrl.savePlaylist(ctrl.playlist, ctrl.playlistItems)"><i class="fa fa-plus"></i>&nbsp;Add</a> ng-click="ctrl.savePlaylist(ctrl.playlist, ctrl.playlistItems)">Create new playlist</a>
<a class="btn btn-success" ng-show="!ctrl.isNew()" <a class="btn btn-success" ng-show="!ctrl.isNew()"
ng-disabled="ctrl.playlistEditForm.$invalid || ctrl.isPlaylistEmpty()" ng-disabled="ctrl.playlistEditForm.$invalid || ctrl.isPlaylistEmpty()"
ng-click="ctrl.savePlaylist(ctrl.playlist, ctrl.playlistItems)">Save</a> ng-click="ctrl.savePlaylist(ctrl.playlist, ctrl.playlistItems)">Save</a>