You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by he...@apache.org on 2012/10/24 17:41:25 UTC
svn commit: r1401736 - in /airavata/sandbox/client-api-demo/src/main/webapp:
index.jsp x_host_descriptor_save.html x_host_display.html x_host_save.html
Author: heshan
Date: Wed Oct 24 15:41:25 2012
New Revision: 1401736
URL: http://svn.apache.org/viewvc?rev=1401736&view=rev
Log:
Updating html.
Added:
airavata/sandbox/client-api-demo/src/main/webapp/x_host_descriptor_save.html
Modified:
airavata/sandbox/client-api-demo/src/main/webapp/index.jsp
airavata/sandbox/client-api-demo/src/main/webapp/x_host_display.html
airavata/sandbox/client-api-demo/src/main/webapp/x_host_save.html
Modified: airavata/sandbox/client-api-demo/src/main/webapp/index.jsp
URL: http://svn.apache.org/viewvc/airavata/sandbox/client-api-demo/src/main/webapp/index.jsp?rev=1401736&r1=1401735&r2=1401736&view=diff
==============================================================================
--- airavata/sandbox/client-api-demo/src/main/webapp/index.jsp (original)
+++ airavata/sandbox/client-api-demo/src/main/webapp/index.jsp Wed Oct 24 15:41:25 2012
@@ -6,16 +6,17 @@
<body>
<h1>Airavata API Demo</h1>
- <h4><a href="./server_info_result.jsp">Airavata Server Information</a></h4>
- <br>
- <h4><a href="./execute_workflow_list.jsp">Workflow Information</a></h4>
- <h4><a href="./monitor_experiment.jsp">Monitor workflow</a></h4>
- <br>
- <h4><a href="./register_host.jsp">Register a Host</a></h4>
- <h4><a href="./register_app.jsp">Register an Application</a></h4>
- <h4><a href="./execute_app.jsp">Execute an Application</a></h4>
+ <%--<h4><a href="./server_info_result.jsp">Airavata Server Information</a></h4>--%>
+ <%--<br>--%>
+ <%--<h4><a href="./execute_workflow_list.jsp">Workflow Information</a></h4>--%>
+ <%--<h4><a href="./monitor_experiment.jsp">Monitor workflow</a></h4>--%>
+ <%--<br>--%>
+ <%--<h4><a href="./register_host.jsp">Register a Host</a></h4>--%>
+ <%--<h4><a href="./register_app.jsp">Register an Application</a></h4>--%>
+ <%--<h4><a href="./execute_app.jsp">Execute an Application</a></h4>--%>
<br>
<h4><a href="./x_host_display.html">Registry Service Test Get</a></h4>
<h4><a href="./x_host_save.html">Registry Service Test Post</a></h4>
+ <h4><a href="./x_host_descriptor_save.html">Save Host Descriptor</a></h4>
</body>
</html>
\ No newline at end of file
Added: airavata/sandbox/client-api-demo/src/main/webapp/x_host_descriptor_save.html
URL: http://svn.apache.org/viewvc/airavata/sandbox/client-api-demo/src/main/webapp/x_host_descriptor_save.html?rev=1401736&view=auto
==============================================================================
--- airavata/sandbox/client-api-demo/src/main/webapp/x_host_descriptor_save.html (added)
+++ airavata/sandbox/client-api-demo/src/main/webapp/x_host_descriptor_save.html Wed Oct 24 15:41:25 2012
@@ -0,0 +1,91 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+ <title></title>
+</head>
+<body>
+
+
+testing
+
+<!--<form action="register_host_result.jsp" method="POST">-->
+
+<div id="div1">
+ <!--<tr><td>-->
+ Host Endpoint
+ <label for="male">Male</label>
+ <!--</td>-->
+ <!--<td>-->
+ <input type="text" name="hostEndpoint" value="gsiftp://gridftp.ranger.tacc.teragrid.org:2811/" size="50">
+ <br/>
+ <!--</td></tr>-->
+ <!--<tr><td>-->
+ Gatekeeper Endpoint
+ <!--</td>-->
+ <!--<td>-->
+ <input type="text" name="gatekeeperEndpoint" value="gatekeeper.ranger.tacc.teragrid.org:2119/jobmanager-sge" size="50">
+ <!--</td></tr>-->
+</div>
+
+
+ <table border="0">
+ <b>HOST</b>
+ <tr><td>Host Name </td>
+ <td> <input type="text" name="hostName" value="gram" size="50"></td></tr>
+ <tr><td>
+ Host Address
+ </td><td>
+ <input type="text" name="hostAddress" value="gatekeeper2.ranger.tacc.teragrid.org" size="50"></td></tr>
+ <tr><td>Host Type </td><td>
+ <input type="text" name="hostType" value="globus" size="50"></td></tr>
+
+ <div id="div2">
+ <tr><td>Host Endpoint </td>
+ <td> <input type="text" name="hostEndpoint" value="gsiftp://gridftp.ranger.tacc.teragrid.org:2811/" size="50"></td></tr>
+ <tr><td>Gatekeeper Endpoint </td>
+ <td> <input type="text" name="gatekeeperEndpoint" value="gatekeeper.ranger.tacc.teragrid.org:2119/jobmanager-sge" size="50"></td></tr>
+ </div>
+ <tr><td>Host Type </td>
+ <td> <select id="drop1">
+ <option selected="true">Local
+ <option>Globus</select></td></tr>
+ </table>
+ <br>
+
+ <!--<input type="SUBMIT" value="Submit"><input type="RESET" value="Reset">-->
+
+<!--</form>-->
+
+<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js" type="text/javascript"></script>
+<script>
+ $(document).ready(function(){
+ $('#drop1 option:selected').select(function () {
+ console.log();
+ if("Local" == $('#drop1 option:selected').text()) {
+ $("div1").hide();
+ } else {
+ $("div1").show();
+ }
+ });
+
+ $("#hide").click(function(){
+ $("div").hide();
+ });
+ $("#show").click(function(){
+ $("div").show();
+ });
+ });
+</script>
+
+<div id="div">
+ <p>If you click on the "Hide" button, I will disappear.</p>
+</div>
+
+<button id="hide">Hide</button>
+<button id="show">Show</button>
+
+
+
+</body>
+</html>
\ No newline at end of file
Modified: airavata/sandbox/client-api-demo/src/main/webapp/x_host_display.html
URL: http://svn.apache.org/viewvc/airavata/sandbox/client-api-demo/src/main/webapp/x_host_display.html?rev=1401736&r1=1401735&r2=1401736&view=diff
==============================================================================
--- airavata/sandbox/client-api-demo/src/main/webapp/x_host_display.html (original)
+++ airavata/sandbox/client-api-demo/src/main/webapp/x_host_display.html Wed Oct 24 15:41:25 2012
@@ -12,8 +12,6 @@ Send an HTTP GET request to a page and g
<button>Get Workflow Information</button>
-
-<!--curl -v http://localhost:9080/airavata-services/registry/api/configuration?key=gfac.url-->
<!--curl -v http://localhost:7080/airavata-registry-rest-services/registry/api/configuration?key=gfac.url-->
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js" type="text/javascript"></script>
@@ -44,25 +42,9 @@ Send an HTTP GET request to a page and g
});
</script>
-<p>If you click on the "Hide" button, I will disappear.</p>
+<p>Click on the "Hide" button. I will disappear.</p>
<button id="hide">Hide</button>
<button id="show">Show</button>
</body>
</html>
-
-
-
-
-
-
-<!--<script src="jquery.js"></script>-->
-<!--<script>-->
-<!--$(document).ready(function(){-->
-<!--$("button").click(function(){-->
-<!--$.get("http://localhost:9080/airavata-services/registry/api/configuration?key=gfac.url",function(data,status){-->
-<!--alert("Data: " + data + "\nStatus: " + status);-->
-<!--});-->
-<!--});-->
-<!--});-->
-<!--</script>-->
\ No newline at end of file
Modified: airavata/sandbox/client-api-demo/src/main/webapp/x_host_save.html
URL: http://svn.apache.org/viewvc/airavata/sandbox/client-api-demo/src/main/webapp/x_host_save.html?rev=1401736&r1=1401735&r2=1401736&view=diff
==============================================================================
--- airavata/sandbox/client-api-demo/src/main/webapp/x_host_save.html (original)
+++ airavata/sandbox/client-api-demo/src/main/webapp/x_host_save.html Wed Oct 24 15:41:25 2012
@@ -8,35 +8,40 @@
Send an HTTP POST
-<button>Get Workflow Information</button>
+<button name="btn1">Save Configuration Information</button>
-<!--curl -H "Accept: text/plain" -X POST -d "key=dummy-key4&value=dummy-value&date=2012-09-21 04:09:56"
-http://localhost:9080/airavata-services/registry/api/save/configuration-->
-
-<!--$.post("test.php", { name: "John", time: "2pm" } );-->
+<!--curl -H "Accept: text/plain" -X POST -d "key=dummy-key4&value=dummy-value&date=2012-09-21 04:09:56" http://localhost:7080/airavata-registry-rest-services/registry/api/save/configuration-->
+<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js" type="text/javascript"></script>
+<script>
+ $(document).ready(function(){
+ $('[name="btn1"]').click(function(){
+ $.post("http://localhost:7080/airavata-registry-rest-services/registry/api/save/configuration",
+ { key: "dummy3", value: "value3" , date : "2011-10-22 00:00:00"} ,function(data,status){
+// TODO : REST api should send some response back in case of a successful invocation of service.
+ alert("Button 1 clicked !");
+ });
+ });
+ });
+ // alert("Data: " + data + "\nStatus: " + status);
+</script>
-<!--<script src="jquery.js"></script>-->
-<!--<script>-->
- <!--$(document).ready(function(){-->
- <!--$("button").click(function(){-->
- <!--$.post("http://localhost:9080/airavata-services/registry/api/save/configuration",function(data,status){-->
- <!--alert("Data: " + data + "\nStatus: " + status);-->
- <!--});-->
- <!--});-->
- <!--});-->
-<!--</script>-->
+<br/>
+<br/>
+<br/>
-<!--<script src="jquery.js"></script>-->
+<button name="btn2">Save Host</button>
+<!--curl -H "Accept: text/plain" -X POST -d "key=dummy-key4&value=dummy-value&date=2012-09-21 04:09:56" http://localhost:7080/airavata-registry-rest-services/registry/api/save/configuration-->
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js" type="text/javascript"></script>
<script>
$(document).ready(function(){
- $("button").click(function(){
-// $.post("http://localhost:9080/airavata-services/registry/api/save/configuration",
- $.post("http://localhost:7080/airavata-registry-rest-services/airavata-services/registry/api/save/configuration",
- { key: "dummy2", value: "date=2012-09-21 04:09:56" } ,function(data,status){
- alert("Data: " + data + "\nStatus: " + status);
- });
+ $('[name="btn2"]').click(function(){
+ $.post("http://localhost:7080/airavata-registry-rest-services/registry/api/hostdescriptor/save",
+ { host: "<type:hostDescription xmlns:type="http://schemas.airavata.apache.org/gfac/type"><type:hostName>testHost1</type:hostName><type:hostAddress>aaaa</type:hostAddress></type:hostDescription"} ,function(data,status){
+// TODO : REST api should send some response back in case of a successful invocation of service.
+// alert("Data: " + data + "\nStatus: " + status);
+ alert("Button 2 clicked !");
+ });
});
});
</script>