Finished normalizing vera devices and scenes.

Separated device add and editng pages.
This commit is contained in:
Admin
2015-08-17 16:10:38 -05:00
parent b9076d1f2e
commit 8d9357cf9e
9 changed files with 291 additions and 80 deletions

View File

@@ -0,0 +1,83 @@
<h2>
Vera Device <a class="btn btn-primary pull-right" href="/">
Configuration</a>
</h2>
<div class="panel panel-default bridgeServer" ng-if="!bridge.error">
<div class="panel-heading">
<h2 class="panel-title">Vera Device List</h2>
</div>
<ul class="list-group">
<li class="list-group-item">
<p class="text-muted">You can select a Vera device and generate
the add device box selections automatically.</p>
<table class="table table-bordered table-striped table-hover">
<thead>
<tr>
<th>Name</th>
<th>Id</th>
<th>Category</th>
<th>Room</th>
<th>Actions</th>
</tr>
</thead>
<tr ng-repeat="veradevice in bridge.veradevices">
<td>{{veradevice.name}}</td>
<td>{{veradevice.id}}</td>
<td>{{veradevice.category}}</td>
<td>{{veradevice.room}}</td>
<td>
<button class="btn btn-success" type="submit"
ng-click="buildDeviceUrls(veradevice)">Generate
Device URLs</button>
</td>
</tr>
</table>
</li>
</ul>
</div>
<div class="panel panel-default bridgeServer" ng-if="!bridge.error">
<div class="panel-heading">
<h2 class="panel-title">Add a Vera device</h2>
</div>
<ul class="list-group">
<li class="list-group-item">
<form class="form-horizontal" ng-submit="addDevice()">
<div class="form-group">
<label class="col-xs-12 col-sm-2 control-label" for="device-name">Name
</label>
<div class="col-xs-8 col-sm-7">
<input type="text" class="form-control" id="device-name"
ng-model="device.name" placeholder="Device Name">
</div>
<button type="submit" class="col-xs-4 col-sm-2 btn btn-primary">
Add Device</button>
</div>
<div class="form-group">
<label class="col-xs-12 col-sm-2 control-label" for="device-on-url">On
URL </label>
<div class="col-xs-8 col-sm-7">
<input type="text" class="form-control" id="device-on-url"
ng-model="device.onUrl" placeholder="URL to turn device on">
</div>
<button class="col-xs-4 col-sm-2 btn btn-success" type="button"
ng-click="testUrl(device.onUrl)">Test</button>
</div>
<div class="form-group">
<label class="col-xs-12 col-sm-2 control-label"
for="device-off-url">Off URL </label>
<div class="col-xs-8 col-sm-7">
<input type="text" class="form-control" id="device-off-url"
ng-model="device.offUrl" placeholder="URL to turn device off">
</div>
<button class="col-xs-4 col-sm-2 btn btn-success" type="button"
ng-click="testUrl(device.offUrl)">Test</button>
</div>
</form>
</li>
</ul>
</div>