<dialog-ok-cancel title="{{ sensor.Id == null ? 'Add' : 'Edit'}} sensor {{ host.Name }}">
    <div class="form-group">
        <label for="name" class="col-sm-2 control-label">Name</label>
        <div class="col-sm-9">
            <input id="name" class="form-control" ng-model="sensor.Name" required lu-enable-permission="{{ permission }}"/>
        </div>
    </div>
    <div class="form-group">
        <label for="url" class="col-sm-2 control-label">Description</label>
        <div class="col-sm-9">
            <input id="url" class="form-control" ng-model="sensor.Description" lu-enable-permission="{{ permission }}"/>
        </div>
    </div>
    <div class="form-group">
        <label for="dropdownHost" class="col-sm-2 control-label">Host</label>
        <div class="btn-group">
                <button class="btn btn-default dropdown-toggle" type="button" id="dropdownHost" data-toggle="dropdown">
                    {{ hosts[sensor.HostId].Name }}
                    <span class="caret"></span>
                </button>
                <ul class="dropdown-menu">
                    <li ng-repeat="host in hosts"><a ng-click="sensor.HostId = host.Id" href="">{{ host.Name }}</a></li>
                </ul>
            </div>
    </div>
    <div class="form-group">
        <label for="dropdownType" class="col-sm-2 control-label">Type</label>
        <div class="btn-group">
            <button class="btn btn-default dropdown-toggle" type="button" id="dropdownType" data-toggle="dropdown">
                {{ sensorTypes[sensor.SensorTypeId].Name }}
                <span class="caret"></span>
            </button>
            <ul class="dropdown-menu">
                <li ng-repeat="type in sensorTypes"><a ng-click="setSensorType(type)" href="">{{ type.Name }}</a></li>
            </ul>
        </div>
    </div>
    <div class="form-group">
        <label for="data" class="col-sm-2 control-label">Data</label>
        <div class="col-sm-9 jsonView">
            <json id="data" child="sensor.Data" default-collapsed="false" type="object"></json>
        </div>
    </div>
</dialog-ok-cancel>