From commits-return-3388-apmail-airavata-commits-archive=airavata.apache.org@airavata.apache.org Mon Nov 5 20:16:41 2012 Return-Path: X-Original-To: apmail-airavata-commits-archive@www.apache.org Delivered-To: apmail-airavata-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B2A7CD70A for ; Mon, 5 Nov 2012 20:16:41 +0000 (UTC) Received: (qmail 5000 invoked by uid 500); 5 Nov 2012 20:16:41 -0000 Delivered-To: apmail-airavata-commits-archive@airavata.apache.org Received: (qmail 4967 invoked by uid 500); 5 Nov 2012 20:16:41 -0000 Mailing-List: contact commits-help@airavata.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@airavata.apache.org Delivered-To: mailing list commits@airavata.apache.org Received: (qmail 4960 invoked by uid 99); 5 Nov 2012 20:16:41 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Nov 2012 20:16:41 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Nov 2012 20:16:39 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id B901F23888CD for ; Mon, 5 Nov 2012 20:16:19 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1405933 - in /airavata/sandbox/client-api-demo: ./ src/main/webapp/ src/main/webapp/html/ src/main/webapp/js/ src/main/webapp/jsp/ Date: Mon, 05 Nov 2012 20:16:19 -0000 To: commits@airavata.apache.org From: heshan@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20121105201619.B901F23888CD@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: heshan Date: Mon Nov 5 20:16:18 2012 New Revision: 1405933 URL: http://svn.apache.org/viewvc?rev=1405933&view=rev Log: Adding Host edit functionality (TODO: dynmic population of data based on user input. Moved unused html to a seperate directory. Added: airavata/sandbox/client-api-demo/src/main/webapp/html/ airavata/sandbox/client-api-demo/src/main/webapp/html/x_app_descriptor_save.html - copied unchanged from r1405927, airavata/sandbox/client-api-demo/src/main/webapp/x_app_descriptor_save.html airavata/sandbox/client-api-demo/src/main/webapp/html/x_host_descriptor_save.html - copied unchanged from r1405927, airavata/sandbox/client-api-demo/src/main/webapp/x_host_descriptor_save.html airavata/sandbox/client-api-demo/src/main/webapp/html/x_host_display.html - copied unchanged from r1405927, airavata/sandbox/client-api-demo/src/main/webapp/x_host_display.html airavata/sandbox/client-api-demo/src/main/webapp/html/x_host_save.html - copied unchanged from r1405927, airavata/sandbox/client-api-demo/src/main/webapp/x_host_save.html airavata/sandbox/client-api-demo/src/main/webapp/js/x_host_descriptor_edit_json.js airavata/sandbox/client-api-demo/src/main/webapp/x_host_descriptor_edit_json.html Removed: airavata/sandbox/client-api-demo/src/main/webapp/x_app_descriptor_save.html airavata/sandbox/client-api-demo/src/main/webapp/x_host_descriptor_save.html 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/pom.xml airavata/sandbox/client-api-demo/src/main/webapp/index.html airavata/sandbox/client-api-demo/src/main/webapp/jsp/index.jsp Modified: airavata/sandbox/client-api-demo/pom.xml URL: http://svn.apache.org/viewvc/airavata/sandbox/client-api-demo/pom.xml?rev=1405933&r1=1405932&r2=1405933&view=diff ============================================================================== --- airavata/sandbox/client-api-demo/pom.xml (original) +++ airavata/sandbox/client-api-demo/pom.xml Mon Nov 5 20:16:18 2012 @@ -24,7 +24,7 @@ 2.2.7 0.9.20 1.6.1 - 1.2.16 + 1.2.15 1.2.8 2.12 2.0 @@ -101,6 +101,12 @@ org.apache.jackrabbit jackrabbit-core ${jackrabbit.version} + + + + + + org.apache.jackrabbit @@ -308,6 +314,11 @@ ${airavata.version} + mysql + mysql-connector-java + 5.0.8 + + org.apache.airavata airavata-workflow-execution-context ${airavata.version} 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=1405933&r1=1405932&r2=1405933&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 20:16:18 2012 @@ -29,10 +29,10 @@
  • Save Host Descriptors
  • Save App Descriptors
  • -
  • Save Host Descriptors
  • -
  • Save App Descriptors
  • -
  • Registry Service Test Get
  • -
  • Registry Service Test Post
  • +
  • Save Host Descriptors
  • +
  • Save App Descriptors
  • +
  • Registry Service Test Get
  • +
  • Registry Service Test Post
  • Added: airavata/sandbox/client-api-demo/src/main/webapp/js/x_host_descriptor_edit_json.js URL: http://svn.apache.org/viewvc/airavata/sandbox/client-api-demo/src/main/webapp/js/x_host_descriptor_edit_json.js?rev=1405933&view=auto ============================================================================== --- airavata/sandbox/client-api-demo/src/main/webapp/js/x_host_descriptor_edit_json.js (added) +++ airavata/sandbox/client-api-demo/src/main/webapp/js/x_host_descriptor_edit_json.js Mon Nov 5 20:16:18 2012 @@ -0,0 +1,84 @@ +/* + * 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 initButtons() { + $("#hostType").change(function() { + if("Local" == $(this).val()) { + $(".endpoint").hide(); + } else { + $(".endpoint").show(); + } + }); + + $("#saveHostButton").click(function(){ + var hostName = $("#hostName1").val(); + var hostAddress = $("#hostAddress1").val(); + var hostEndpoint = $("#hostEndpoint1").val(); + var gatekeeperEndpoint = $("#gatekeeperEndpoint1").val(); + + if (("" == hostEndpoint) || ("" == gatekeeperEndpoint)) { + alert("if Case"); + $.ajax({ + + beforeSend: function(x) { + if (x && x.overrideMimeType) { + x.overrideMimeType("application/j-son;charset=UTF-8"); + } + }, + type: "POST", + dataType: "json", + contentType: "application/json;charset=utf-8", + url: "http://localhost:7080/airavata-registry-rest-services/registry/api/hostdescriptor/update", + data: JSON.stringify({ + "hostname": hostName, + "hostAddress": hostAddress + }) + }).done(function( msg ) { + alert( "Data Saved: " + msg ); + }); + } else { + alert("end Case"); + $.ajax({ + beforeSend: function(x) { + if (x && x.overrideMimeType) { + x.overrideMimeType("application/j-son;charset=UTF-8"); + } + }, + type: "POST", + dataType: "json", + contentType: "application/json;charset=utf-8", + url: "http://localhost:7080/airavata-registry-rest-services/registry/api/hostdescriptor/update", + data: JSON.stringify({ + "hostname": hostName, + "hostAddress": hostAddress, + "hostEndpoint" : hostEndpoint, + "gatekeeperEndpoint" : gatekeeperEndpoint + }) + }).done(function( msg ) { + alert( "Data Saved: " + msg ); + }); + } + + }); +} + +$(document).ready(function(){ + $(".endpoint").hide(); + initButtons(); +}); \ No newline at end of file Modified: airavata/sandbox/client-api-demo/src/main/webapp/jsp/index.jsp URL: http://svn.apache.org/viewvc/airavata/sandbox/client-api-demo/src/main/webapp/jsp/index.jsp?rev=1405933&r1=1405932&r2=1405933&view=diff ============================================================================== --- airavata/sandbox/client-api-demo/src/main/webapp/jsp/index.jsp (original) +++ airavata/sandbox/client-api-demo/src/main/webapp/jsp/index.jsp Mon Nov 5 20:16:18 2012 @@ -22,11 +22,11 @@

    Save Host Descriptor - jason

    Save App Descriptor - Jason


    -

    Save Host Descriptor

    -

    Save App Descriptor

    +

    Save Host Descriptor

    +

    Save App Descriptor

    -

    Registry Service Test Get

    -

    Registry Service Test Post

    +

    Registry Service Test Get

    +

    Registry Service Test Post

    \ No newline at end of file Added: airavata/sandbox/client-api-demo/src/main/webapp/x_host_descriptor_edit_json.html URL: http://svn.apache.org/viewvc/airavata/sandbox/client-api-demo/src/main/webapp/x_host_descriptor_edit_json.html?rev=1405933&view=auto ============================================================================== --- airavata/sandbox/client-api-demo/src/main/webapp/x_host_descriptor_edit_json.html (added) +++ airavata/sandbox/client-api-demo/src/main/webapp/x_host_descriptor_edit_json.html Mon Nov 5 20:16:18 2012 @@ -0,0 +1,39 @@ + + + + Update Host Description + + + + + + + +

    + + +

    Update Host Description

    +
    +
    +

    + + + + + +

    +
    +
    + + + +