Author: heshan
Date: Mon Nov  5 19:23:40 2012
New Revision: 1405926

URL: http://svn.apache.org/viewvc?rev=1405926&view=rev
Log:
Applying patch AIRAVATA-630

Modified:
    airavata/sandbox/client-api-demo/src/main/webapp/index.html
    
airavata/sandbox/client-api-demo/src/main/webapp/js/x_app_descriptor_save_json.js
    
airavata/sandbox/client-api-demo/src/main/webapp/js/x_host_descriptor_save_json.js
    
airavata/sandbox/client-api-demo/src/main/webapp/x_app_descriptor_save_json.html
    
airavata/sandbox/client-api-demo/src/main/webapp/x_host_descriptor_save_json.html

Modified: airavata/sandbox/client-api-demo/src/main/webapp/index.html
URL: 
http://svn.apache.org/viewvc/airavata/sandbox/client-api-demo/src/main/webapp/index.html?rev=1405926&r1=1405925&r2=1405926&view=diff
==============================================================================
--- airavata/sandbox/client-api-demo/src/main/webapp/index.html (original)
+++ airavata/sandbox/client-api-demo/src/main/webapp/index.html Mon Nov  5 
19:23:40 2012
@@ -1,27 +1,43 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
-        "http://www.w3.org/TR/html4/loose.dtd";>
+<!DOCTYPE html>
 <html>
 <head>
-    <title>Airavata Demo</title>
+<title>Airavata Demo</title>
+<link href="bootstrap/css/bootstrap.min.css" rel="stylesheet"
+       media="screen">
 </head>
 
-    <body>
-        <h1>Airavata API Demo</h1>
+<body>
 
-        <br/>
-        <h4><a href="x_host_descriptor_view_json.html">View Host Descriptors - 
Jason</a></h4>
-        <h4><a href="x_app_descriptor_view_json.html">View App Descriptors - 
Jason</a></h4>
+       <div class="navbar navbar-inverse navbar-fixed-top">
+               <div class="navbar-inner">
+                       <div class="container-fluid">
+                               <a class="brand" href="">Airavata API Demo</a>
+                       </div>
+               </div>
+       </div>
+       <br><br>
+       
+       <div class="container-fluid">
+               <div class="row-fluid">
+                       <div class="span3">
+                               <div class="well sidebar-nav">
+                                       <ul class="nav nav-list">
+                                               <li class="nav-header">View 
JSON</li>
+                                               <li><a 
href="x_host_descriptor_view_json.html">View Host Descriptors</a></li>
+                                               <li><a 
href="x_app_descriptor_view_json.html">View App Descriptors</a></li>
+                                               <li class="nav-header">Save 
JSON</li>
+                                               <li><a 
href="x_host_descriptor_save_json.html">Save Host Descriptors</a></li>
+                                               <li><a 
href="x_app_descriptor_save_json.html">Save App Descriptors</a></li>
+                                               <li 
class="nav-header">Others</li>
+                                               <li><a 
href="x_host_descriptor_save.html">Save Host     Descriptors</a></li>
+                                               <li><a 
href="x_app_descriptor_save.html">Save App Descriptors</a></li>
+                                               <li><a 
href="x_host_display.html">Registry Service Test Get</a></li>
+                                               <li><a 
href="x_host_save.html">Registry Service Test Post</a></li>
+                                       </ul>
+                               </div>
+                       </div>
+               </div>
+       </div>
 
-        <br/>
-        <h4><a href="x_host_descriptor_save_json.html">Save Host Descriptor - 
jason</a></h4>
-        <h4><a href="x_app_descriptor_save_json.html">Save App Descriptor - 
Jason</a></h4>
-        <br/>
-
-        <h4><a href="x_host_descriptor_save.html">Save Host Descriptor</a></h4>
-        <h4><a href="x_app_descriptor_save.html">Save App Descriptor</a></h4>
-
-        <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>
-
-    </body>
+</body>
 </html>
\ No newline at end of file

Modified: 
airavata/sandbox/client-api-demo/src/main/webapp/js/x_app_descriptor_save_json.js
URL: 
http://svn.apache.org/viewvc/airavata/sandbox/client-api-demo/src/main/webapp/js/x_app_descriptor_save_json.js?rev=1405926&r1=1405925&r2=1405926&view=diff
==============================================================================
--- 
airavata/sandbox/client-api-demo/src/main/webapp/js/x_app_descriptor_save_json.js
 (original)
+++ 
airavata/sandbox/client-api-demo/src/main/webapp/js/x_app_descriptor_save_json.js
 Mon Nov  5 19:23:40 2012
@@ -1,6 +1,21 @@
-var jsonRequest = {};
-var inputCount = 1;
-var outputCount = 1;
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 function xmlToString(xml) {
     var xmlData = $(xml);
@@ -15,25 +30,31 @@ function xmlToString(xml) {
     return xmlString;
 }
 
-$(document).ready(function(){
+function initButtons() {
+       var jsonRequest = {};
+       var inputCount = 1;
+       var outputCount = 1;
 
-    $("p1").live("click", function(){
+    $("#addInputButton").live("click", function(){
         inputCount++;
-        $(this).after("<br/>Input Name         *:" +
-            "<input type=&quot;text&quot; id=&quot;inputName" + inputCount + 
"&quot; name=&quot;inputName" + inputCount + "&quot; size=&quot;50&quot;><br/>" 
+
-            "Input Type         *:" +
-            "<input type=&quot;text&quot; id=&quot;inputType" + inputCount + 
"&quot; name=&quot;inputType" + inputCount + "&quot; 
size=&quot;50&quot;><br/>");
+        $(this).before("<br>");
+        $(this).before("<label class=\"span2\">Input Name         *:" +
+                "</label><input type=\"text\" id=\"inputName" + inputCount + 
"\" name=\"inputName" + inputCount + "\" value=\"echo_input\">");
+
+        $(this).before("<label class=\"span2\">Input Type         *:" +
+                       "</label><input type=\"text\" id=\"inputType" + 
inputCount + "\" name=\"inputType" + inputCount + "\" value=\"String\">");
     });
 
-    $("p2").live("click", function(){
+    $("#addOutputButton").live("click", function(){
         outputCount++;
-        $(this).after("<br/>Output Name         *:" +
-            "<input type=&quot;text&quot; id=&quot;outputName" + outputCount + 
"&quot; name=&quot;outputName" + outputCount + "&quot; 
size=&quot;50&quot;><br/>" +
-            "Output Type         *:" +
-            "<input type=&quot;text&quot; id=&quot;outputType" + outputCount + 
"&quot; name=&quot;outputType" + outputCount + "&quot; 
size=&quot;50&quot;><br/>");
+        $(this).before("<label class=\"span2\">Output Name         *:" +
+                       "</label><input type=\"text\" id=\"outputName" + 
outputCount + "\" name=\"outputName" + outputCount + "\" 
value=\"echo_output\">");
+
+        $(this).before("<label class=\"span2\">Output Type         *:" +
+                       "</label><input type=\"text\" id=\"outputType" + 
outputCount + "\" name=\"outputType" + outputCount + "\" value=\"String\">");
     });
 
-    $('[name="saveAppButton"]').click(function(){
+    $("#saveAppButton").click(function(){
         var appName = $("#appName1").val();
         var hostName = $("#hostName1").val();
         var serviceName = $("#serviceName1").val();
@@ -116,4 +137,8 @@ $(document).ready(function(){
             });
 
     });
+}
+
+$(document).ready(function(){
+       initButtons();
 });
\ No newline at end of file

Modified: 
airavata/sandbox/client-api-demo/src/main/webapp/js/x_host_descriptor_save_json.js
URL: 
http://svn.apache.org/viewvc/airavata/sandbox/client-api-demo/src/main/webapp/js/x_host_descriptor_save_json.js?rev=1405926&r1=1405925&r2=1405926&view=diff
==============================================================================
--- 
airavata/sandbox/client-api-demo/src/main/webapp/js/x_host_descriptor_save_json.js
 (original)
+++ 
airavata/sandbox/client-api-demo/src/main/webapp/js/x_host_descriptor_save_json.js
 Mon Nov  5 19:23:40 2012
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
 function xmlToString(xml) {
     var xmlData = $(xml);
     var xmlString;
@@ -11,21 +30,16 @@ function xmlToString(xml) {
     return xmlString;
 }
 
-$(document).ready(function(){
-    $(window).load(function () {
-        $("div").hide();
-    });
-
-    $("select[name='drop1']").change(function() {
-        //alert($(this).val());
+function initButtons() {
+       $("#hostType").change(function() {
         if("Local" == $(this).val()) {
-            $("div").hide();
+            $(".endpoint").hide();
         } else {
-            $("div").show();
+            $(".endpoint").show();
         }
     });
 
-    $('[name="saveHostButton"]').click(function(){
+    $("#saveHostButton").click(function(){
         //alert($(this).val());
         var hostName = $("#hostName1").val();
         var hostAddress = $("#hostAddress1").val();
@@ -88,4 +102,9 @@ $(document).ready(function(){
         }
 
     });
+}
+
+$(document).ready(function(){
+    $(".endpoint").hide();
+    initButtons();
 });
\ No newline at end of file

Modified: 
airavata/sandbox/client-api-demo/src/main/webapp/x_app_descriptor_save_json.html
URL: 
http://svn.apache.org/viewvc/airavata/sandbox/client-api-demo/src/main/webapp/x_app_descriptor_save_json.html?rev=1405926&r1=1405925&r2=1405926&view=diff
==============================================================================
--- 
airavata/sandbox/client-api-demo/src/main/webapp/x_app_descriptor_save_json.html
 (original)
+++ 
airavata/sandbox/client-api-demo/src/main/webapp/x_app_descriptor_save_json.html
 Mon Nov  5 19:23:40 2012
@@ -1,46 +1,54 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
-        "http://www.w3.org/TR/html4/loose.dtd";>
+<!DOCTYPE html>
 <html>
 <head>
-    <title></title>
+    <title>Register Host Description</title>
+       <link href="bootstrap/css/bootstrap.min.css" rel="stylesheet" 
media="screen">
+       <script 
src="//ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js" 
type="text/javascript"></script>
+       <script src="js/x_app_descriptor_save_json.js"></script>
 </head>
 <body>
 
-<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js" 
type="text/javascript"></script>
-<script type="text/javascript" src="js/x_app_descriptor_save_json.js" 
></script>
+    <div class="navbar navbar-inverse navbar-fixed-top">
+      <div class="navbar-inner">
+        <div class="container-fluid">
+          <a class="brand" href="">Airavata API Demo</a>
+        </div>
+      </div>
+    </div>
+       <br><br>
+
+
+       <h3> Register Host Description </h3>
+       <div class="well row">
+               <div class="span5">
+                       <p class="span5">
+                               <label class="span2">Application 
Name*</label><input type="text" required="required" class="span3" id="appName1" 
name="appName" value="EchoLocal">
+                               <label class="span2">Executable location 
*</label> <input type="text" required="required" class="span3" 
id="exeuctableLocation1" name="exeuctableLocation" value="/bin/echo">
+                               <label class="span2">Scratch Working 
Dir.*</label> <input type="text" required="required" class="span3" 
id="scratchWorkingDirectory1" name="scratchWorkingDirectory" 
value="/scratch/01437/ogce/test">
+                               <label class="span2">Host Name           
*</label> <input type="text" required="required" class="span3" name="hostName" 
id="hostName1">
+                               <label class="span2">Project Acc. number  
</label> <input type="text" class="span3" id="projAccNumber1" 
name="projAccNumber" value="TG-STA110014S">
+                               <label class="span2">Queue Name           
</label> <input type="text" class="span3" id="queueName1" name="queueName" 
value="development">
+                               <label class="span2">CPU count            
</label> <input type="text" class="span3" id="cpuCount1" name="cpuCount" 
value="1">
+                               <label class="span2">Node count           
</label> <input type="text" class="span3" id="nodeCount1" name="nodeCount" 
value="1">
+                               <label class="span2">Max memory           
</label> <input type="text" class="span3" id="maxMemory1" name="maxMemory" 
value="100">
+                       </p>
+               </div>
+               <div class="span5">
+                       <p class="span5">
+                               <b>SERVICE</b><br>
+                               <label class="span2">Service Name        
*:</label> <input type="text" required="required" class="span3" 
id="serviceName1" name="serviceName" value="SimpleEcho">
+                               <label class="span2">Input Name          
*:</label> <input type="text" required="required" class="span3" id="inputName1" 
name="inputName1" value="echo_input">
+                               <label class="span2">Input Type          
*:</label> <input type="text" required="required" class="span3" id="inputType1" 
name="inputType1" value="String">
+                               <button class="btn btn-small" 
id="addInputButton">Add Input</button><br>                                
+                               <label class="span2">Output Name         
*:</label> <input type="text" required="required" class="span3" 
id="outputName1" name="outputName1" value="echo_output">
+                               <label class="span2">Output Type         
*:</label> <input type="text" required="required" class="span3" 
id="outputType1" name="outputType1" value="String">
+                               <button class="btn btn-small" 
id="addOutputButton">Add Output</button><br>
+                       </p>
+               </div>
+       </div>
 
-<b> Register Host Description </b><br/>
+       <button class="btn btn-primary btn-medium" id="saveAppButton" >Save 
Application</button>
 
-Application Name    *: <input type="text" id="appName1" name="appName" 
value="EchoLocal" size="50"><br/>
-Executable location *: <input type="text" id="exeuctableLocation1" 
name="exeuctableLocation" value="/bin/echo" size="50"><br/>
-Scratch Working Dir.*: <input type="text" id="scratchWorkingDirectory1" 
name="scratchWorkingDirectory" value="/scratch/01437/ogce/test" size="50"><br/>
-
-Host Name           *: <input type="text" name="hostName" id="hostName1" 
size="75"><br/>
-
-Project Acc. number  : <input type="text" id="projAccNumber1" 
name="projAccNumber" value="TG-STA110014S" size="50"><br/>
-Queue Name           : <input type="text" id="queueName1" name="queueName" 
value="development" size="50"><br/>
-CPU count            : <input type="text" id="cpuCount1" name="cpuCount" 
value="1" size="50"><br/>
-Node count           : <input type="text" id="nodeCount1" name="nodeCount" 
value="1" size="50"><br/>
-Max memory           : <input type="text" id="maxMemory1" name="maxMemory" 
value="100" size="50"><br/>
-
-<b>SERVICE</b><br/>
-Service Name        *: <input type="text" id="serviceName1" name="serviceName" 
value="SimpleEcho" size="50"><br/>
-Input Name          *: <input type="text" id="inputName1" name="inputName1" 
value="echo_input" size="50"><br/>
-Input Type          *: <input type="text" id="inputType1" name="inputType1" 
value="String" size="50"><br/>
-<p1><b><i>Add inputs</i></b></p1><br/>
-
-Output Name         *: <input type="text" id="outputName1" name="outputName1" 
value="echo_output" size="50"><br/>
-Output Type         *: <input type="text" id="outputType1" name="outputType1" 
value="String" size="50"><br/>
-<p2><b><i>Add outputs</i></b></p2><br/>
-
-<button name="saveAppButton">Save Application</button>
-
-<style>
-    p { background:#b0c4de; font-weight:bold; cursor:pointer;
-        padding:5px; }
-    p.over { background: #ccc; }
-    span { color:red; }
-</style>
 
 </body>
 </html>

Modified: 
airavata/sandbox/client-api-demo/src/main/webapp/x_host_descriptor_save_json.html
URL: 
http://svn.apache.org/viewvc/airavata/sandbox/client-api-demo/src/main/webapp/x_host_descriptor_save_json.html?rev=1405926&r1=1405925&r2=1405926&view=diff
==============================================================================
--- 
airavata/sandbox/client-api-demo/src/main/webapp/x_host_descriptor_save_json.html
 (original)
+++ 
airavata/sandbox/client-api-demo/src/main/webapp/x_host_descriptor_save_json.html
 Mon Nov  5 19:23:40 2012
@@ -1,38 +1,39 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
-        "http://www.w3.org/TR/html4/loose.dtd";>
+<!DOCTYPE html>
 <html>
 <head>
-    <title></title>
+       <title>Register Host Description</title>
+       <link href="bootstrap/css/bootstrap.min.css" rel="stylesheet" 
media="screen">
+       <script 
src="//ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js" 
type="text/javascript"></script>
+       <script src="js/x_host_descriptor_save_json.js"></script>
 </head>
 <body>
 
-<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js" 
type="text/javascript"></script>
-<script type="text/javascript" src="js/x_host_descriptor_save_json.js" 
></script>
-
-<b> Register Host Description </b>
-<br/>
-
-Host Name           : <input type="text" name="hostName" id="hostName1" 
size="75">
-<br/>
-Host Address        : <input type="text" name="hostAddress" id="hostAddress1" 
size="75">
-<br/>
-Host Type           : <select name="drop1">
-    <option selected="true">Local</option>
-    <option>Globus</option>
-</select>
-<br/>
-<div id="div">
-    Host Endpoint       : <input type="text" name="hostEndpoint" 
id="hostEndpoint1" size="75">
-    <br/>
-    Gatekeeper Endpoint : <input type="text" name="gatekeeperEndpoint" 
id="gatekeeperEndpoint1" size="75">
-    <br/>
-</div>
-
-<button name="saveHostButton">Save Host</button>
-
-<script>
-
-</script>
+       <div class="navbar navbar-inverse navbar-fixed-top">
+               <div class="navbar-inner">
+                       <div class="container-fluid">
+                               <a class="brand" href="">Airavata API Demo</a>
+                       </div>
+               </div>
+       </div>
+       <br><br>
+
+
+       <h3>Register Host Description</h3>
+       <div class="well row">
+               <div class="span7">
+                       <p class="span7">
+                               <label class="span3">Host Name</label><input 
class="span4" type="text" name="hostName" id="hostName1" size="75">
+                               <label class="span3">Host Address</label><input 
class="span4" type="text" name="hostAddress" id="hostAddress1" size="75">
+                               <label class="span3">Host Type</label> <select 
class="span4" id="hostType">
+                                       <option 
selected="selected">Local</option>
+                                       <option>Globus</option>
+                                       </select>
+                               <label class="span3 endpoint">Host 
Endpoint</label><input class="span4 endpoint" type="text" name="hostEndpoint" 
id="hostEndpoint1" size="75">
+                               <label class="span3 endpoint">Gatekeeper 
Endpoint</label><input class="span4 endpoint" type="text" 
name="gatekeeperEndpoint" id="gatekeeperEndpoint1" size="75">
+                       </p>
+               </div>
+       </div>
+       <button class="btn btn-primary btn-medium" id="saveHostButton">Save     
Host</button>
 
 </body>
 </html>


Reply via email to