mirror of
https://github.com/bwssytems/ha-bridge.git
synced 2025-12-16 18:24:36 +00:00
Finished config up/down load impl and Finished startup action implementation
This commit is contained in:
2
pom.xml
2
pom.xml
@@ -5,7 +5,7 @@
|
||||
|
||||
<groupId>com.bwssystems.HABridge</groupId>
|
||||
<artifactId>ha-bridge</artifactId>
|
||||
<version>5.2.next_e</version>
|
||||
<version>5.3.0RC1</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>HA Bridge</name>
|
||||
|
||||
@@ -437,6 +437,41 @@ public class SystemControl {
|
||||
return stop();
|
||||
});
|
||||
|
||||
// http://ip_address:port/system/devices/backup/download CORS request
|
||||
options(SYSTEM_CONTEXT + "/backup/download", "application/json", (request, response) -> {
|
||||
response.status(HttpStatus.SC_OK);
|
||||
response.header("Access-Control-Allow-Origin", request.headers("Origin"));
|
||||
response.header("Access-Control-Allow-Methods", "PUT");
|
||||
response.header("Access-Control-Allow-Headers", request.headers("Access-Control-Request-Headers"));
|
||||
response.header("Content-Type", "text/html; charset=utf-8");
|
||||
return "";
|
||||
});
|
||||
put (SYSTEM_CONTEXT + "/backup/download", "application/json", (request, response) -> {
|
||||
log.debug("Create download: {}", request.body());
|
||||
BackupFilename aFilename = new Gson().fromJson(request.body(), BackupFilename.class);
|
||||
String backupContent = bridgeSettings.downloadBackup(aFilename.getFilename());
|
||||
return backupContent;
|
||||
}, new JsonTransformer());
|
||||
|
||||
// http://ip_address:port/system/devices/backup/upload CORS request
|
||||
options(SYSTEM_CONTEXT + "/backup/upload/:filename", "application/json", (request, response) -> {
|
||||
response.status(HttpStatus.SC_OK);
|
||||
response.header("Access-Control-Allow-Origin", request.headers("Origin"));
|
||||
response.header("Access-Control-Allow-Methods", "PUT");
|
||||
response.header("Access-Control-Allow-Headers", request.headers("Access-Control-Request-Headers"));
|
||||
response.header("Content-Type", "text/html; charset=utf-8");
|
||||
return "";
|
||||
});
|
||||
put (SYSTEM_CONTEXT + "/backup/upload/:filename", "application/json", (request, response) -> {
|
||||
log.debug("Create upload: {} - {}", request.params(":filename"), request.body());
|
||||
String theSuccess = bridgeSettings.uploadBackup(request.params(":filename"), request.body());
|
||||
if(theSuccess.contains("Error:"))
|
||||
response.status(HttpStatus.SC_METHOD_FAILURE);
|
||||
else
|
||||
response.status(HttpStatus.SC_OK);
|
||||
return theSuccess;
|
||||
}, new JsonTransformer());
|
||||
|
||||
// http://ip_address:port/system/backup/available returns a list of config backup filenames
|
||||
get (SYSTEM_CONTEXT + "/backup/available", (request, response) -> {
|
||||
log.debug("Get backup filenames");
|
||||
|
||||
@@ -89,6 +89,9 @@ public class DeviceDescriptor{
|
||||
@SerializedName("lockDeviceId")
|
||||
@Expose
|
||||
private boolean lockDeviceId;
|
||||
@SerializedName("startupActions")
|
||||
@Expose
|
||||
private String startupActions;
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
@@ -344,4 +347,12 @@ public class DeviceDescriptor{
|
||||
public void setLockDeviceId(boolean lockDeviceId) {
|
||||
this.lockDeviceId = lockDeviceId;
|
||||
}
|
||||
|
||||
public String getStartupActions() {
|
||||
return startupActions;
|
||||
}
|
||||
|
||||
public void setStartupActions(String startupActions) {
|
||||
this.startupActions = startupActions;
|
||||
}
|
||||
}
|
||||
@@ -202,15 +202,33 @@ public class DeviceRepository extends BackupHandler {
|
||||
List<DeviceDescriptor> list = new ArrayList<DeviceDescriptor>(devices.values());
|
||||
Iterator<DeviceDescriptor> deviceIterator = list.iterator();
|
||||
Map<String, DeviceDescriptor> newdevices = new HashMap<String, DeviceDescriptor>();
|
||||
|
||||
nextId = seedId;
|
||||
List<String> lockedIds = new ArrayList<String>();
|
||||
String hexValue;
|
||||
Integer newValue;
|
||||
DeviceDescriptor theDevice;
|
||||
log.debug("Renumber devices with seed: {}", seedId);
|
||||
boolean findNext = true;
|
||||
|
||||
|
||||
nextId = seedId;
|
||||
while(deviceIterator.hasNext()) {
|
||||
theDevice = deviceIterator.next();
|
||||
if(theDevice.isLockDeviceId()) {
|
||||
lockedIds.add(theDevice.getId());
|
||||
}
|
||||
}
|
||||
log.debug("Renumber devices starting with: {}", nextId);
|
||||
deviceIterator = list.iterator();
|
||||
while (deviceIterator.hasNext()) {
|
||||
theDevice = deviceIterator.next();
|
||||
if (!theDevice.isLockDeviceId()) {
|
||||
findNext = true;
|
||||
while(findNext) {
|
||||
if(lockedIds.contains(String.valueOf(nextId))) {
|
||||
nextId++;
|
||||
} else {
|
||||
findNext = false;
|
||||
}
|
||||
}
|
||||
theDevice.setId(String.valueOf(nextId));
|
||||
newValue = nextId % 256;
|
||||
if (newValue <= 0)
|
||||
|
||||
@@ -41,6 +41,7 @@ import org.slf4j.LoggerFactory;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.awt.Color;
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
@@ -77,6 +78,7 @@ public class HueMulator {
|
||||
// This function sets up the sparkjava rest calls for the hue api
|
||||
public void setupServer() {
|
||||
log.info("Hue emulator service started....");
|
||||
startupDeviceCall();
|
||||
before(HUE_CONTEXT + "/*", (request, response) -> {
|
||||
// This currently causes an error with Spark replies
|
||||
// String path = request.pathInfo();
|
||||
@@ -1671,4 +1673,50 @@ public class HueMulator {
|
||||
|
||||
return responseString;
|
||||
}
|
||||
|
||||
private void startupDeviceCall() {
|
||||
String aUserId = bridgeSettingMaster.getBridgeSecurity().createWhitelistUser("test_ha_bridge");
|
||||
List<DeviceDescriptor> deviceList = repository.findAll();
|
||||
String aChangeBody;
|
||||
String[] components;
|
||||
boolean comma = false;
|
||||
|
||||
for (DeviceDescriptor aDevice : deviceList) {
|
||||
if(aDevice.getStartupActions() != null && !aDevice.getStartupActions().isEmpty()) {
|
||||
log.info("Startup call for {} with startupActions {}", aDevice.getName(), aDevice.getStartupActions());
|
||||
aChangeBody = "{";
|
||||
components = aDevice.getStartupActions().split(":");
|
||||
if(components.length > 0 && components[0] != null && components[0].length() > 0) {
|
||||
if(components[0].equals("On")) {
|
||||
aChangeBody = aChangeBody + "\"on\":true";
|
||||
}
|
||||
else {
|
||||
aChangeBody = aChangeBody + "\"on\":false";
|
||||
}
|
||||
comma = true;
|
||||
}
|
||||
if(components.length > 1 && components[1] != null && components[1].length() > 0 && !(components.length > 2 && components[2] != null && components[2].length() > 0)) {
|
||||
if(comma)
|
||||
aChangeBody = aChangeBody + ",";
|
||||
aChangeBody = aChangeBody + "\"bri\":" + components[1];
|
||||
comma = true;
|
||||
}
|
||||
if(components.length > 2 && components[2] != null && components[2].length() > 0) {
|
||||
if(comma)
|
||||
aChangeBody = aChangeBody + ",";
|
||||
String theRGB = components[2].substring(components[2].indexOf('(') + 1, components[2].indexOf(')'));
|
||||
String[] RGB = theRGB.split(",");
|
||||
float[] hsb = new float[3];
|
||||
Color.RGBtoHSB(Integer.parseInt(RGB[0]), Integer.parseInt(RGB[1]), Integer.parseInt(RGB[2]), hsb);
|
||||
float hue = hsb[0] * (float) 360.0;
|
||||
float sat = hsb[1] * (float) 100.0;
|
||||
float bright = hsb[2] * (float) 100.0;
|
||||
aChangeBody = String.format("%s\"hue\":%.2f,\"sat\":%.2f,\"bri\":%d", aChangeBody, hue, sat, Math.round(bright));
|
||||
}
|
||||
aChangeBody = aChangeBody + "}";
|
||||
log.info("Startup call to set state for {} with body {}", aDevice.getName(), aChangeBody);
|
||||
changeState(aUserId, aDevice.getId(), aChangeBody, "localhost", true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1279,7 +1279,7 @@ app.service('bridgeService', function ($rootScope, $http, $base64, $location, ng
|
||||
);
|
||||
};
|
||||
|
||||
this.downloadBackup = function (afilename) {
|
||||
this.downloadDeviceBackup = function (afilename) {
|
||||
return $http.put(this.state.base + "/backup/download", {
|
||||
filename: afilename
|
||||
}).then(
|
||||
@@ -1459,6 +1459,54 @@ app.service('bridgeService', function ($rootScope, $http, $base64, $location, ng
|
||||
);
|
||||
};
|
||||
|
||||
this.downloadConfigBackup = function (afilename) {
|
||||
return $http.put(this.state.systemsbase + "/backup/download", {
|
||||
filename: afilename
|
||||
}).then(
|
||||
function (response) {
|
||||
self.state.backupContent = response.data;
|
||||
var blob = new Blob([self.state.backupContent], {
|
||||
type: 'text/plain'
|
||||
});
|
||||
var downloadLink = angular.element('<a></a>');
|
||||
downloadLink.attr('href', window.URL.createObjectURL(blob));
|
||||
downloadLink.attr('download', afilename);
|
||||
downloadLink[0].click();
|
||||
},
|
||||
function (error) {
|
||||
if (error.status === 401)
|
||||
$rootScope.$broadcast('securityReinit', 'done');
|
||||
else
|
||||
self.displayWarn("Download Backup Config File Error:", error);
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
this.uploadConfigFile = function (filename, file) {
|
||||
file.upload = Upload.http({
|
||||
url: this.state.systemsbase + "/backup/upload/" + filename,
|
||||
method: 'PUT',
|
||||
headers: {
|
||||
'Content-Type': file.type
|
||||
},
|
||||
data: file
|
||||
});
|
||||
|
||||
file.upload.then(function (response) {
|
||||
file.result = response.data;
|
||||
self.viewConfigs();
|
||||
}, function (response) {
|
||||
if (response.status === 401)
|
||||
$rootScope.$broadcast('securityReinit', 'done');
|
||||
else if (response.status > 0)
|
||||
self.displayWarn('Upload Backup Config File Error:' + response.status + ': ' + response.data);
|
||||
});
|
||||
|
||||
file.upload.progress(function (evt) {
|
||||
file.progress = Math.min(100, parseInt(100.0 * evt.loaded / evt.total));
|
||||
});
|
||||
}
|
||||
|
||||
this.deleteDevice = function (id) {
|
||||
return $http.delete(this.state.base + "/" + id).then(
|
||||
function (response) {
|
||||
@@ -2074,6 +2122,17 @@ app.controller('SystemController', function ($scope, $location, bridgeService, n
|
||||
$scope.deleteSettingsBackup = function (backupname) {
|
||||
bridgeService.deleteSettingsBackup(backupname);
|
||||
};
|
||||
|
||||
$scope.downloadBackup = function (backupname) {
|
||||
bridgeService.downloadConfigBackup(backupname);
|
||||
};
|
||||
|
||||
$scope.uploadConfigFile = function (aFilename, aConfigFile) {
|
||||
if (aConfigFile != null) {
|
||||
bridgeService.uploadConfigFile(aFilename, aConfigFile);
|
||||
}
|
||||
};
|
||||
|
||||
$scope.toggle = function () {
|
||||
$scope.visible = !$scope.visible;
|
||||
if ($scope.visible)
|
||||
@@ -2349,12 +2408,41 @@ app.controller('ViewingController', function ($scope, $location, bridgeService,
|
||||
bridgeService.editDevice(device);
|
||||
$location.path('/editdevice');
|
||||
};
|
||||
$scope.setStartupAction = function(device) {
|
||||
$scope.bridge.device = device;
|
||||
ngDialog.open({
|
||||
template: 'startupActionDialog',
|
||||
controller: 'StartupActionDialogCtrl',
|
||||
className: 'ngdialog-theme-default'
|
||||
});
|
||||
};
|
||||
|
||||
$scope.renumberDevices = function () {
|
||||
bridgeService.renumberDevices();
|
||||
};
|
||||
$scope.pushLinkButton = function () {
|
||||
bridgeService.pushLinkButton();
|
||||
};
|
||||
|
||||
$scope.toggleLock = function (device) {
|
||||
if(device.lockDeviceId) {
|
||||
device.lockDeviceId = false;
|
||||
} else {
|
||||
device.lockDeviceId = true;
|
||||
}
|
||||
console.log("toggle lock device called: " + device.name);
|
||||
bridgeService.addDevice(device).then(
|
||||
function () {
|
||||
bridgeService.state.queueDevId = device.id;
|
||||
console.log("Device updated for Q Id <<" + bridgeService.state.queueDevId + ">>");
|
||||
$location.path('/');
|
||||
},
|
||||
function (error) {
|
||||
bridgeService.displayWarn("Error updating lock id for device....", error);
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
$scope.manageLinksButton = function () {
|
||||
ngDialog.open({
|
||||
template: 'views/managelinksdialog.html',
|
||||
@@ -2372,7 +2460,7 @@ app.controller('ViewingController', function ($scope, $location, bridgeService,
|
||||
bridgeService.deleteBackup(backupname);
|
||||
};
|
||||
$scope.downloadBackup = function (backupname) {
|
||||
bridgeService.downloadBackup(backupname);
|
||||
bridgeService.downloadDeviceBackup(backupname);
|
||||
};
|
||||
|
||||
$scope.uploadDeviceFile = function (aFilename, aDeviceFile) {
|
||||
@@ -2408,23 +2496,23 @@ app.controller('ViewingController', function ($scope, $location, bridgeService,
|
||||
});
|
||||
|
||||
app.controller('ValueDialogCtrl', function ($scope, bridgeService, ngDialog) {
|
||||
$scope.bridge = bridgeService.state;
|
||||
$scope.valueType = "percentage";
|
||||
$scope.slider = {
|
||||
value: 100,
|
||||
value: Math.round($scope.bridge.device.deviceState.bri / 2.55),
|
||||
options: {
|
||||
floor: 1,
|
||||
ceil: 100,
|
||||
showSelectionBar: true
|
||||
}
|
||||
};
|
||||
$scope.bridge = bridgeService.state;
|
||||
$scope.valueType = "percentage";
|
||||
$scope.changeScale = function () {
|
||||
if ($scope.valueType === "raw") {
|
||||
$scope.slider.options.ceil = 254;
|
||||
$scope.slider.value = 254;
|
||||
$scope.slider.value = $scope.bridge.device.deviceState.bri;
|
||||
} else {
|
||||
$scope.slider.options.ceil = 100;
|
||||
$scope.slider.value = 100;
|
||||
$scope.slider.value = Math.round($scope.bridge.device.deviceState.bri / 2.55);
|
||||
}
|
||||
};
|
||||
$scope.setValue = function () {
|
||||
@@ -2473,6 +2561,57 @@ app.controller('DeleteDialogCtrl', function ($scope, bridgeService, ngDialog) {
|
||||
};
|
||||
});
|
||||
|
||||
app.controller('StartupActionDialogCtrl', function ($scope, bridgeService, ngDialog) {
|
||||
$scope.bridge = bridgeService.state;
|
||||
$scope.device = $scope.bridge.device;
|
||||
$scope.setDim = false;
|
||||
var components = [];
|
||||
if($scope.device.startupActions != undefined) {
|
||||
components = $scope.device.startupActions.split(":");
|
||||
if(components[1] != undefined && components[1].length > 0)
|
||||
$scope.setDim = true;
|
||||
} else {
|
||||
components = "::".split(":");
|
||||
}
|
||||
|
||||
$scope.slider = {
|
||||
value: parseInt(components[1]),
|
||||
options: {
|
||||
floor: 1,
|
||||
ceil: 254,
|
||||
showSelectionBar: true
|
||||
}
|
||||
};
|
||||
$scope.rgbPicker = {
|
||||
color: components[2]
|
||||
};
|
||||
|
||||
$scope.theState = components[0];
|
||||
|
||||
$scope.startupActionSave = function (device) {
|
||||
console.log("Startup action set for device called: " + device.name);
|
||||
ngDialog.close('ngdialog1');
|
||||
var theValue = 1;
|
||||
if($scope.setDim) {
|
||||
theValue = $scope.theState + ":" + $scope.slider.value + ":" + $scope.rgbPicker.color;
|
||||
} else {
|
||||
theValue = $scope.theState + "::" + $scope.rgbPicker.color;
|
||||
}
|
||||
if(theValue == "::")
|
||||
theValue = "";
|
||||
device.startupActions = theValue;
|
||||
bridgeService.addDevice(device).then(
|
||||
function () {
|
||||
bridgeService.state.queueDevId = device.id;
|
||||
console.log("Device updated for Q Id <<" + bridgeService.state.queueDevId + ">>");
|
||||
},
|
||||
function (error) {
|
||||
bridgeService.displayWarn("Error updating lock id for device....", error);
|
||||
}
|
||||
);
|
||||
};
|
||||
});
|
||||
|
||||
app.controller('VeraController', function ($scope, $location, bridgeService, ngDialog) {
|
||||
$scope.bridge = bridgeService.state;
|
||||
$scope.device = bridgeService.state.device;
|
||||
|
||||
@@ -68,9 +68,9 @@
|
||||
<th sortable-header col="id" comparator-fn="comparatorUniqueId">ID</th>
|
||||
<th sortable-header col="name">Name</th>
|
||||
<th sortable-header col="description">Description</th>
|
||||
<th sortable-header col="devicestate">Device State</th>
|
||||
<th sortable-header col="deviceType">Type</th>
|
||||
<th sortable-header col="targetDevice">Target</th>
|
||||
<th sortable-header col="startupAction">Startup Action</th>
|
||||
<th sortable-header col="inactive">Inactive</th>
|
||||
<th sortable-header col="noState">No State</th>
|
||||
<th>Actions</th>
|
||||
@@ -79,14 +79,17 @@
|
||||
<tr ng-repeat="device in bridge.devices | filterDevicesByRequester:bridge.state.filterDevicesByIpAddress:bridge.state.filterDevicesOnlyFiltered:bridge.state.filterDeviceType"
|
||||
row-id="{{device.id}}" ng-class="{info: bridge.viewDevId == device.id}">
|
||||
<td>{{$index+1}}</td>
|
||||
<td>{{device.id}}</td>
|
||||
<td>{{device.name}}</td>
|
||||
<td class="cr">{{device.description}}</td>
|
||||
<td class="cr">
|
||||
on={{device.deviceState.on}},bri={{device.deviceState.bri}},hue={{device.deviceState.hue}},sat={{device.deviceState.sat}},effect={{device.deviceState.effect}},ct={{device.deviceState.ct}},alert={{device.deviceState.alert}},colormode={{device.deviceState.colormode}},reachable={{device.deviceState.reachable}},XYList={{device.deviceState.xy}}
|
||||
<td title="Locked: {{device.lockDeviceId}} - Click to Toggle" ng-click="toggleLock(device)">
|
||||
<b ng-if="device.lockDeviceId">{{device.id}}</b>
|
||||
<p ng-if="!device.lockDeviceId">{{device.id}}</p>
|
||||
</td>
|
||||
<td
|
||||
title="on={{device.deviceState.on}},bri={{device.deviceState.bri}},hue={{device.deviceState.hue}},sat={{device.deviceState.sat}},effect={{device.deviceState.effect}},ct={{device.deviceState.ct}},alert={{device.deviceState.alert}},colormode={{device.deviceState.colormode}},reachable={{device.deviceState.reachable}},XYList={{device.deviceState.xy}}">
|
||||
{{device.name}}</td>
|
||||
<td class="cr">{{device.description}}</td>
|
||||
<td>{{device.deviceType}}</td>
|
||||
<td>{{device.targetDevice}}</td>
|
||||
<td class="cr" title="Click to set actions for device on ha-bridge startup." ng-click="setStartupAction(device)">{{device.startupActions}}</td>
|
||||
<td>{{device.inactive}}</td>
|
||||
<td>{{device.noState}}</td>
|
||||
<td>
|
||||
@@ -142,8 +145,8 @@
|
||||
<button ng-disabled="!myForm.$valid" type="submit" class="btn btn-primary"
|
||||
ng-click="uploadDeviceFile(deviceFile.name, deviceFile)">Upload</button>
|
||||
<span class="progress" ng-show="deviceFile.progress >= 0">
|
||||
<div style="width:{{deviceFile.progress}}%" ng-bind="deviceFile.progress + '%'"
|
||||
class="ng-binding"></div>
|
||||
<div style="width:{{deviceFile.progress}}%" ng-bind="deviceFile.progress + '%'" class="ng-binding">
|
||||
</div>
|
||||
</span>
|
||||
<span ng-show="deviceFile.result">Upload Successful</span>
|
||||
</div>
|
||||
@@ -202,3 +205,43 @@
|
||||
<button type="button" class="ngdialog-button ngdialog-button-error" ng-click="deleteDevice(device)">Delete</button>
|
||||
</div>
|
||||
</script>
|
||||
<script type="text/ng-template" id="startupActionDialog">
|
||||
<div class="ngdialog-message">
|
||||
<h2>Select Actions for startup on {{device.name}}</h2>
|
||||
<table class="table table-bordered table-striped table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Setting</th>
|
||||
<th>Value</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr>
|
||||
<td>State</td>
|
||||
<td>
|
||||
<select name="the-state" id="the-state" ng-model="theState">
|
||||
<option value="">---None---</option>
|
||||
<!-- not selected / blank option -->
|
||||
<option value="On">On</option>
|
||||
<option value="Off">Off</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Dim</td>
|
||||
<td>
|
||||
<input type="checkbox"
|
||||
ng-model="setDim" ng-true-value=true
|
||||
ng-false-value=false>
|
||||
<rzslider rz-slider-model="slider.value" rz-slider-options="slider.options"></rzslider>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Color RGB</td>
|
||||
<td><input colorpicker="rgb" ng-model="rgbPicker.color" type="text"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="ngdialog-buttons mt">
|
||||
<button type="button" class="ngdialog-button ngdialog-button-error" ng-click="startupActionSave(device)">Save</button>
|
||||
</div>
|
||||
</script>
|
||||
@@ -985,6 +985,22 @@
|
||||
Settings</button>
|
||||
</div>
|
||||
</form>
|
||||
<form class="form-horizontal" name="myForm">
|
||||
<div class="form-group">
|
||||
<label class="col-xs-12 col-sm-2 control-label" for="backup-name">Config File to upload</label>
|
||||
<div class="col-xs-8 col-sm-7">
|
||||
<input type="file" ngf-select="" ng-model="configFile" name="file">
|
||||
</div>
|
||||
|
||||
<button ng-disabled="!myForm.$valid" type="submit" class="btn btn-primary"
|
||||
ng-click="uploadConfigFile(configFile.name, configFile)">Upload</button>
|
||||
<span class="progress" ng-show="configFile.progress >= 0">
|
||||
<div style="width:{{configFile.progress}}%" ng-bind="configFile.progress + '%'"
|
||||
class="ng-binding"></div>
|
||||
</span>
|
||||
<span ng-show="configFile.result">Upload Successful</span>
|
||||
</div>
|
||||
</form>
|
||||
<table class="table table-bordered table-striped table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -993,7 +1009,7 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tr ng-repeat="backup in bridge.configs">
|
||||
<td>{{backup}}</td>
|
||||
<td><a class="btn" ng-click="downloadBackup(backup)" ng-href="{{ url }}">{{backup}}</a></td>
|
||||
<td>
|
||||
<button class="btn btn-danger" type="submit"
|
||||
ng-click="restoreSettings(backup)">Restore</button>
|
||||
|
||||
Reference in New Issue
Block a user