airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hes...@apache.org
Subject svn commit: r1410506 - in /airavata/sandbox/client-api-demo/src/main/webapp: js/x_workflow_monitor.js x_workflow_monitor.html
Date Fri, 16 Nov 2012 17:40:20 GMT
Author: heshan
Date: Fri Nov 16 17:40:19 2012
New Revision: 1410506

URL: http://svn.apache.org/viewvc?rev=1410506&view=rev
Log:
Updates to javascript.

Modified:
    airavata/sandbox/client-api-demo/src/main/webapp/js/x_workflow_monitor.js
    airavata/sandbox/client-api-demo/src/main/webapp/x_workflow_monitor.html

Modified: airavata/sandbox/client-api-demo/src/main/webapp/js/x_workflow_monitor.js
URL: http://svn.apache.org/viewvc/airavata/sandbox/client-api-demo/src/main/webapp/js/x_workflow_monitor.js?rev=1410506&r1=1410505&r2=1410506&view=diff
==============================================================================
--- airavata/sandbox/client-api-demo/src/main/webapp/js/x_workflow_monitor.js (original)
+++ airavata/sandbox/client-api-demo/src/main/webapp/js/x_workflow_monitor.js Fri Nov 16 17:40:19
2012
@@ -28,39 +28,17 @@ $(document).ready(function(){
                 }
             },
             type: "GET",
-            dataType: "json",
+//            dataType: "json",
+            data : {user : "admin"},
             contentType: "application/json;charset=utf-8",
             url: "http://localhost:7080/airavata-registry-rest-services/registry/api/provenanceregistry/get/experimentId/user",
-            success: function(data, status, settings) {
-                var keys=[],result='';
-                $.each(data.hostDescriptions,function(i,row){
-                    $.each(row,function(key,value){
-                        if ($.inArray(key,keys)==-1) keys.push(key);
-                    })
-                });
-                result+="<thead><tr>";
-                $.each(keys,function(i,key){
-                    result+="<th>"+key+"<\/th>";
-                });
-                result+="<\/tr><\/thead><tbody>";
-                $.each(data.hostDescriptions,function(i,row){
-                    result+="<tr>";
-                    $.each(keys,function(i,key){
-                        result+="<td>"+ (row[key]||'') + "<\/td>";
-                    });
-                    result+="<\/tr>";
-                });
-                result+="<\/tbody>";
-                $('#display').html(result);
-
-            },
             error: function(ajaxrequest, ajaxOptions, thrownError){
                 alert(thrownError);
             }
 
-        });/*.done(function(msg) {
-         alert( "Data Saved: " + JSON.stringify(msg));
-         });*/
+        }).done(function(msg) {
+                $("#jason-text").html(JSON.stringify(msg));
+            });
 
     });
 });
\ No newline at end of file

Modified: airavata/sandbox/client-api-demo/src/main/webapp/x_workflow_monitor.html
URL: http://svn.apache.org/viewvc/airavata/sandbox/client-api-demo/src/main/webapp/x_workflow_monitor.html?rev=1410506&r1=1410505&r2=1410506&view=diff
==============================================================================
--- airavata/sandbox/client-api-demo/src/main/webapp/x_workflow_monitor.html (original)
+++ airavata/sandbox/client-api-demo/src/main/webapp/x_workflow_monitor.html Fri Nov 16 17:40:19
2012
@@ -26,12 +26,15 @@
 <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_view_json.js" ></script>
+<script type="text/javascript" src="js/x_workflow_monitor.js" ></script>
 
 <h1>Get Host Descriptor Information </h1>
 <button name="btn2">Click</button>
 
 <table id="display"></table>
 
+<textarea id="jason-text" rows="50" cols="150" placeholder="Experiment List">
+</textarea>
+
 </body>
 </html>
\ No newline at end of file



Mime
View raw message