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/29 15:23:36 UTC
svn commit: r1403309 -
/airavata/sandbox/client-api-demo/src/main/webapp/x_host_descriptor_save.html
Author: heshan
Date: Mon Oct 29 14:23:35 2012
New Revision: 1403309
URL: http://svn.apache.org/viewvc?rev=1403309&view=rev
Log:
Refactoring UI.
Modified:
airavata/sandbox/client-api-demo/src/main/webapp/x_host_descriptor_save.html
Modified: 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=1403309&r1=1403308&r2=1403309&view=diff
==============================================================================
--- airavata/sandbox/client-api-demo/src/main/webapp/x_host_descriptor_save.html (original)
+++ airavata/sandbox/client-api-demo/src/main/webapp/x_host_descriptor_save.html Mon Oct 29 14:23:35 2012
@@ -58,13 +58,10 @@ Gatekeeper Endpoint : <input type="text"
$('[name="btn2"]').click(function(){
//alert($(this).val());
- alert("button btn2 clicked!");
var hostName = $("#hostName1").val();
var hostAddress = $("#hostAddress1").val();
var hostEndpoint = $("#hostEndpoint1").val();
var gatekeeperEndpoint = $("#gatekeeperEndpoint1").val();
-
-// var xml = $('<type:hostDescription xmlns:type="http://schemas.airavata.apache.org/gfac/type"><type:hostName>mylocalhost</type:hostName><type:hostAddress>127.0.01</type:hostAddress></type:hostDescription>');
var xml = $('<type:hostDescription xmlns:type="http://schemas.airavata.apache.org/gfac/type"><type:hostName>' + hostName + '</type:hostName><type:hostAddress>' + hostAddress + '</type:hostAddress></type:hostDescription>');
var xmlData= $(xml);
@@ -81,24 +78,16 @@ Gatekeeper Endpoint : <input type="text"
alert(hostAddress);
alert(xmlString);
-
-
$.ajax({
headers: {
Accept : "text/plain; charset=utf-8"
-
-// "Content-Type": "text/xml",
-// contentType: "text/xml",
-// "Content-Type": "text/plain; charset=utf-8",
-// "Accept-Encoding" : ""
},
-// beforeSend: function(xhr, s) {
-// xhr.setRequestHeader("Accept-Encoding" ,"");
-// xhr.setRequestHeader("Content-Type", "text/xml");
-// },
+ /*beforeSend: function(xhr, s) {
+ xhr.setRequestHeader("Accept-Encoding" ,"");
+ xhr.setRequestHeader("Content-Type", "text/xml");
+ },*/
type: "POST",
-// contentType : "application/x-www-form-urlencoded",
url: "http://localhost:7080/airavata-registry-rest-services/registry/api/hostdescriptor/save",
data: {
hostName: hostName,
@@ -106,64 +95,12 @@ Gatekeeper Endpoint : <input type="text"
hostEndpoint : hostEndpoint,
gatekeeperEndpoint : gatekeeperEndpoint
}
-// dataType: "xml"
-
-
- /*type: "POST",
- url: "http://localhost:6060/airavata-registry-rest-services/registry/api/hostdescriptor/save",
- data: {name: "amit", id:"1" },
- dataType: "json",
- beforeSend: function(x) {
- if (x && x.overrideMimeType) {
- x.overrideMimeType("application/j-son;charset=UTF-8");
- }
- }*/
-
}).done(function( msg ) {
alert( "Data Saved: " + msg );
});
-
-
-// $.post("http://localhost:7080/airavata-registry-rest-services/registry/api/hostdescriptor/save",
-
- /*$.post("http://localhost:6060/airavata-registry-rest-services/registry/api/hostdescriptor/save",
- { host: xmlString} ,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("button2 post sent !");
- });*/
});
});
</script>
</body>
</html>
-
-<!--"<type:hostDescription xsi:type="type:globusHostType" xmlns:type="http://schemas.airavata.apache.org/gfac/type" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">-->
- <!--<type:hostName>trestles</type:hostName>-->
- <!--<type:hostAddress>trestles.sdsc.edu</type:hostAddress>-->
- <!--<type:gridFTPEndPoint>gsiftp://trestles-dm1.sdsc.xsede.org:2811/</type:gridFTPEndPoint>-->
- <!--<type:globusGateKeeperEndPoint>trestles.sdsc.edu:2119/jobmanager-pbs</type:globusGateKeeperEndPoint>-->
-<!--</type:hostDescription>"-->
-
-
-<!--<type:hostDescription xmlns:type="http://schemas.airavata.apache.org/gfac/type">-->
- <!--<type:hostName>mylocalhost</type:hostName>-->
- <!--<type:hostAddress>127.0.01</type:hostAddress>-->
-<!--</type:hostDescription>-->
-
-<!--<type:hostDescription xmlns:type="http://schemas.airavata.apache.org/gfac/type">-->
- <!--<type:hostName>mylocalhost</type:hostName>-->
- <!--<type:hostAddress>127.0.01</type:hostAddress>-->
-<!--</type:hostDescription>-->
-
-<!--<type:hostdescription xmlns:type="http://schemas.airavata.apache.org/gfac/type">-->
- <!--<type:hostname>gram-99</type:hostname>-->
- <!--<type:hostaddress>gatekeeper2.ranger.tacc.teragrid.org</type:hostaddress>-->
-<!--</type:hostdescription>-->
-
-
-<!--curl -H "Accept: text/plain" -X POST -d 'host=<type:hostDescription xmlns:type="http://schemas.airavata.apache.org/gfac/type"><type:hostName>testHost3</type:hostName><type:hostAddress>aaaa</type:hostAddress></type:hostDescription>' http://localhost:7080/airavata-registry-rest-services/registry/api/hostdescriptor/save-->
-<!--curl -H "Accept: text/plain" -X POST -d 'host=<type:hostDescription xmlns:type="http://schemas.airavata.apache.org/gfac/type"><type:hostName>mylocalhost2</type:hostName><type:hostAddress>127.0.01</type:hostAddress></type:hostDescription>' http://localhost:7080/airavata-registry-rest-services/registry/api/hostdescriptor/save-->
-
-<!--<type:hostDescription xmlns:type="http://schemas.airavata.apache.org/gfac/type"><type:hostName>mylocalhost2</type:hostName><type:hostAddress>127.0.01</type:hostAddress></type:hostDescription>-->