Omaha #3718 Restored data delivery subscription backup web page
Change-Id: I87c40d3476068eef80cee8bdb47b41fa96539734 Former-commit-id: f7c7fe2f7b845563335559839a832b26c2ad2b2a
This commit is contained in:
parent
cddda47923
commit
825aa0d5b2
1 changed files with 134 additions and 0 deletions
|
@ -0,0 +1,134 @@
|
|||
<html>
|
||||
|
||||
<head>
|
||||
<style type="text/css">
|
||||
a {font-weight:bold;}
|
||||
td {width:200px;}
|
||||
button {width:190px;}
|
||||
input{width:300px;}
|
||||
table {border:0;}
|
||||
select {width:200px;}
|
||||
body { font-family: Helvetica;
|
||||
margin-left: 75px;
|
||||
margin-right: 75px;
|
||||
background: #D3D3D3;}
|
||||
</style>
|
||||
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Backup/Restore Subscriptions</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h3>Backup/Restore Data Delivery Subscriptions</h3>
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<button id="backupSubscriptionButton" onClick="backupSubscription()" >Backup Subscription</button>
|
||||
</td>
|
||||
<td>
|
||||
<input id="backupSubscriptionText" type="text"/></td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<button id="backupAllSubscriptionsButton" onClick="backupAllSubscriptions()">Backup All Subscriptions</button>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<button id="restoreSubscriptionButton" onClick="restoreSubscription()" >Restore Subscription</button>
|
||||
</td>
|
||||
<td>
|
||||
<input id="restoreSubscriptionText" type="text"/></td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<button id="restoreSubscriptionsButton" onClick="restoreSubscriptions()">Restore Subscriptions</button>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<button id="viewSubscriptionsButton" onClick="viewSubscriptions()">View Subscriptions</button>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<button id="clearBackedUpSubscriptionsButton" onClick="clearBackupDir()">Clear Backup Files</button>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<p>
|
||||
<p>
|
||||
<div id="statusSpan" style="font-weight:bold; font-size:8pt"></span>
|
||||
<br>
|
||||
</body>
|
||||
|
||||
<script language="JavaScript">
|
||||
|
||||
function clearBackupDir(){
|
||||
updateStatus("Clearing backup files...")
|
||||
updateStatus(callRESTService("clearSubscriptionBackupFiles"))
|
||||
}
|
||||
|
||||
function viewSubscriptions(){
|
||||
updateStatus("Retrieving Subscriptions...")
|
||||
updateStatus(callRESTService("getSubscriptions"))
|
||||
}
|
||||
|
||||
function restoreSubscription(){
|
||||
subscription = document.getElementById("restoreSubscriptionText").value
|
||||
if(subscription){
|
||||
updateStatus("Restoring subscription: ["+subscription+"]...")
|
||||
updateStatus(callRESTService("restoreSubscription/"+subscription))
|
||||
}else{
|
||||
updateStatus("Please input a subscription name to be restored")
|
||||
}
|
||||
}
|
||||
|
||||
function restoreSubscriptions(){
|
||||
updateStatus("Restoring Subscriptions...")
|
||||
updateStatus(callRESTService("restoreSubscriptions"))
|
||||
}
|
||||
|
||||
function backupSubscription(){
|
||||
subscription = document.getElementById("backupSubscriptionText").value
|
||||
if(subscription){
|
||||
updateStatus("Backing up subscription: ["+subscription+"]...")
|
||||
updateStatus(callRESTService("backupSubscription/"+subscription))
|
||||
}else{
|
||||
updateStatus("Please input a subscription name to be backed up")
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function backupAllSubscriptions(){
|
||||
updateStatus("Backing up subscriptions...")
|
||||
updateStatus(callRESTService("backupAllSubscriptions"))
|
||||
}
|
||||
|
||||
function callRESTService(func){
|
||||
var url = "https://"+window.location.host+"/dataDelivery/dataAccess/"+func;
|
||||
var client = new XMLHttpRequest();
|
||||
client.open("GET", url, false);
|
||||
client.setRequestHeader("Content-Type", "text/plain");
|
||||
client.send();
|
||||
return client.responseText
|
||||
}
|
||||
|
||||
function updateStatus(status){
|
||||
document.getElementById("statusSpan").innerHTML = status
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
</html>
|
Loading…
Add table
Reference in a new issue