2015-08-02 08:27:05 +02:00
< div id = "editDevice" class = "modal fade" tabindex = "-1" >
< div class = "modal-dialog modal-lg" >
< div class = "modal-content" >
< div class = "modal-header" >
2015-08-10 11:22:37 +02:00
< h4 class = "modal-title" >
< span ng-show = "!editingExisting" > < span class = "fa fa-desktop" > < / span > < span translate > Add Device< / span > < / span >
< span ng-show = "editingExisting" > < span class = "fa fa-pencil" > < / span > < span translate > Edit Device< / span > < / span >
< / h4 >
2015-08-02 08:27:05 +02:00
< / div >
< div class = "modal-body" >
< form role = "form" name = "deviceEditor" >
< div class = "form-group" ng-class = "{'has-error': deviceEditor.deviceID.$invalid && deviceEditor.deviceID.$dirty}" >
< label translate for = "deviceID" > Device ID< / label >
< input ng-if = "!editingExisting" name = "deviceID" id = "deviceID" class = "form-control text-monospace" type = "text" ng-model = "currentDevice.deviceID" required valid-deviceid list = "discovery-list" / >
< datalist id = "discovery-list" ng-if = "!editingExisting" >
< option ng-repeat = "(id,address) in discovery" value = "{{ id }}" / >
< / datalist >
< div ng-if = "editingExisting" class = "well well-sm text-monospace" > {{currentDevice.deviceID}}< / div >
< p class = "help-block" >
< span translate ng-if = "deviceEditor.deviceID.$valid || deviceEditor.deviceID.$pristine" > The device ID to enter here can be found in the "Edit > Show ID" dialog on the other device. Spaces and dashes are optional (ignored).< / span >
< span translate ng-show = "!editingExisting && (deviceEditor.deviceID.$valid || deviceEditor.deviceID.$pristine)" > When adding a new device, keep in mind that this device must be added on the other side too.< / span >
< span translate ng-if = "deviceEditor.deviceID.$error.required && deviceEditor.deviceID.$dirty" > The device ID cannot be blank.< / span >
< span translate ng-if = "deviceEditor.deviceID.$error.validDeviceid && deviceEditor.deviceID.$dirty" > The entered device ID does not look valid. It should be a 52 or 56 character string consisting of letters and numbers, with spaces and dashes being optional.< / span >
< / p >
< / div >
< div class = "form-group" >
< label translate for = "name" > Device Name< / label >
< input id = "name" class = "form-control" type = "text" ng-model = "currentDevice.name" > < / input >
< p translate ng-if = "currentDevice.deviceID == myID" class = "help-block" > Shown instead of Device ID in the cluster status. Will be advertised to other devices as an optional default name.< / p >
< p translate ng-if = "currentDevice.deviceID != myID" class = "help-block" > Shown instead of Device ID in the cluster status. Will be updated to the name the device advertises if left empty.< / p >
< / div >
< div class = "form-group" >
< label translate for = "addresses" > Addresses< / label >
2015-08-08 11:29:13 +02:00
< input ng-disabled = "currentDevice.deviceID == myID" id = "addresses" class = "form-control" type = "text" ng-model = "currentDevice._addressesStr" > < / input >
2015-08-02 08:27:05 +02:00
< p translate class = "help-block" > Enter comma separated "ip:port" addresses or "dynamic" to perform automatic discovery of the address.< / p >
< / div >
2015-08-12 21:31:34 +02:00
< div class = "form-group" >
2015-08-02 08:27:05 +02:00
< label translate > Compression< / label >
< select class = "form-control" ng-model = "currentDevice.compression" >
< option value = "always" translate > All Data< / option >
< option value = "metadata" translate > Metadata Only< / option >
< option value = "never" translate > Off< / option >
< / select >
< / div >
2015-08-12 21:31:34 +02:00
< div class = "form-group" >
2015-08-02 08:27:05 +02:00
< div class = "checkbox" >
< label >
< input type = "checkbox" ng-model = "currentDevice.introducer" > < span translate > Introducer< / span >
< / label >
< p translate class = "help-block" > Any devices configured on an introducer device will be added to this device as well.< / p >
< / div >
< / div >
2015-08-12 21:31:34 +02:00
< div class = "row" >
2015-08-02 08:27:05 +02:00
< div class = "col-md-12" >
< div class = "form-group" >
< label translate for = "folders" > Share Folders With Device< / label >
< p translate class = "help-block" > Select the folders to share with this device.< / p >
2015-08-08 11:35:02 +02:00
< div class = "row" >
< div class = "col-md-4" ng-repeat = "folder in folderList()" >
< div class = "checkbox" >
< label >
< input type = "checkbox" ng-model = "currentDevice.selectedFolders[folder.id]" > {{folder.id}}
< / label >
< / div >
2015-08-02 08:27:05 +02:00
< / div >
< / div >
< / div >
< / div >
< / div >
< / form >
< / div >
< div class = "modal-footer" >
2015-08-10 11:22:37 +02:00
< button type = "button" class = "btn btn-primary btn-sm" ng-click = "saveDevice()" ng-disabled = "deviceEditor.$invalid" >
< span class = "fa fa-check" > < / span > < span translate > Save< / span >
< / button >
< button type = "button" class = "btn btn-default btn-sm" data-dismiss = "modal" >
< span class = "fa fa-times" > < / span > < span translate > Close< / span >
< / button >
< button type = "button" class = "btn btn-warning pull-left btn-sm" ng-click = "deleteDevice()" ng-if = "editingExisting" >
< span class = "fa fa-minus-circle" > < / span > < span translate > Remove< / span >
< / button >
2015-08-02 08:27:05 +02:00
< / div >
< / div >
< / div >
< / div >