Author: heshan
Date: Wed Nov 7 16:24:32 2012
New Revision: 1406705
URL: http://svn.apache.org/viewvc?rev=1406705&view=rev
Log:
Added Host Update.
Host delete is not working properly.
Addded missing license headers.
Modified:
airavata/sandbox/client-api-demo/src/main/webapp/index.html
airavata/sandbox/client-api-demo/src/main/webapp/js/x_app_descriptor_view_jason.js
airavata/sandbox/client-api-demo/src/main/webapp/js/x_host_descriptor_edit_json.js
airavata/sandbox/client-api-demo/src/main/webapp/js/x_host_descriptor_view_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_app_descriptor_view_json.html
airavata/sandbox/client-api-demo/src/main/webapp/x_host_descriptor_edit_json.html
airavata/sandbox/client-api-demo/src/main/webapp/x_host_descriptor_save_json.html
airavata/sandbox/client-api-demo/src/main/webapp/x_host_descriptor_view_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=1406705&r1=1406704&r2=1406705&view=diff
==============================================================================
--- airavata/sandbox/client-api-demo/src/main/webapp/index.html (original)
+++ airavata/sandbox/client-api-demo/src/main/webapp/index.html Wed Nov 7
16:24:32 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.
+ -->
+
<!DOCTYPE html>
<html>
<head>
@@ -28,6 +47,9 @@
<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">Edit JSON</li>
+ <li><a href="x_host_descriptor_edit_json.html">Edit
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="html/x_host_descriptor_save.html">Save Host Descriptors</a></li>
<li><a
href="html/x_app_descriptor_save.html">Save App Descriptors</a></li>
Modified:
airavata/sandbox/client-api-demo/src/main/webapp/js/x_app_descriptor_view_jason.js
URL:
http://svn.apache.org/viewvc/airavata/sandbox/client-api-demo/src/main/webapp/js/x_app_descriptor_view_jason.js?rev=1406705&r1=1406704&r2=1406705&view=diff
==============================================================================
---
airavata/sandbox/client-api-demo/src/main/webapp/js/x_app_descriptor_view_jason.js
(original)
+++
airavata/sandbox/client-api-demo/src/main/webapp/js/x_app_descriptor_view_jason.js
Wed Nov 7 16:24:32 2012
@@ -1,3 +1,21 @@
+/*
+ * 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.
+ */
$(document).ready(function(){
Modified:
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=1406705&r1=1406704&r2=1406705&view=diff
==============================================================================
---
airavata/sandbox/client-api-demo/src/main/webapp/js/x_host_descriptor_edit_json.js
(original)
+++
airavata/sandbox/client-api-demo/src/main/webapp/js/x_host_descriptor_edit_json.js
Wed Nov 7 16:24:32 2012
@@ -26,7 +26,7 @@ function initButtons() {
}
});
- $("#saveHostButton").click(function(){
+ $("#updateHostButton").click(function(){
var hostName = $("#hostName1").val();
var hostAddress = $("#hostAddress1").val();
var hostEndpoint = $("#hostEndpoint1").val();
@@ -49,8 +49,8 @@ function initButtons() {
"hostname": hostName,
"hostAddress": hostAddress
})
- }).done(function( msg ) {
- alert( "Data Saved: " + msg );
+ }).done(function(msg) {
+ alert( "Host Updated : " + msg );
});
} else {
alert("end Case");
@@ -70,12 +70,34 @@ function initButtons() {
"hostEndpoint" : hostEndpoint,
"gatekeeperEndpoint" : gatekeeperEndpoint
})
- }).done(function( msg ) {
- alert( "Data Saved: " + msg );
+ }).done(function(msg) {
+ alert( "Host Updated : " + msg );
});
}
});
+
+ $("#deleteHostButton").click(function(){
+ var hostName = $("#hostName1").val();
+
+ $.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/delete",
+ data: JSON.stringify({
+ "hostname": hostName
+ })
+ }).done(function( msg ) {
+ alert( "Host Deleted: " + msg );
+ });
+
+ });
}
$(document).ready(function(){
Modified:
airavata/sandbox/client-api-demo/src/main/webapp/js/x_host_descriptor_view_json.js
URL:
http://svn.apache.org/viewvc/airavata/sandbox/client-api-demo/src/main/webapp/js/x_host_descriptor_view_json.js?rev=1406705&r1=1406704&r2=1406705&view=diff
==============================================================================
---
airavata/sandbox/client-api-demo/src/main/webapp/js/x_host_descriptor_view_json.js
(original)
+++
airavata/sandbox/client-api-demo/src/main/webapp/js/x_host_descriptor_view_json.js
Wed Nov 7 16:24:32 2012
@@ -1,3 +1,21 @@
+/*
+ * 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.
+ */
$(document).ready(function(){
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=1406705&r1=1406704&r2=1406705&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
Wed Nov 7 16:24:32 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.
+ -->
+
<!DOCTYPE html>
<html>
<head>
Modified:
airavata/sandbox/client-api-demo/src/main/webapp/x_app_descriptor_view_json.html
URL:
http://svn.apache.org/viewvc/airavata/sandbox/client-api-demo/src/main/webapp/x_app_descriptor_view_json.html?rev=1406705&r1=1406704&r2=1406705&view=diff
==============================================================================
---
airavata/sandbox/client-api-demo/src/main/webapp/x_app_descriptor_view_json.html
(original)
+++
airavata/sandbox/client-api-demo/src/main/webapp/x_app_descriptor_view_json.html
Wed Nov 7 16:24:32 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.
+ -->
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
Modified:
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=1406705&r1=1406704&r2=1406705&view=diff
==============================================================================
---
airavata/sandbox/client-api-demo/src/main/webapp/x_host_descriptor_edit_json.html
(original)
+++
airavata/sandbox/client-api-demo/src/main/webapp/x_host_descriptor_edit_json.html
Wed Nov 7 16:24:32 2012
@@ -33,7 +33,8 @@
</p>
</div>
</div>
-<button class="btn btn-primary btn-medium" id="saveHostButton">Save
Host</button>
+<button class="btn btn-primary btn-medium" id="updateHostButton">Update
Host</button>
+<button class="btn btn-primary btn-medium" id="deleteHostButton">Delete
Host</button>
</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=1406705&r1=1406704&r2=1406705&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
Wed Nov 7 16:24:32 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.
+ -->
+
<!DOCTYPE html>
<html>
<head>
Modified:
airavata/sandbox/client-api-demo/src/main/webapp/x_host_descriptor_view_json.html
URL:
http://svn.apache.org/viewvc/airavata/sandbox/client-api-demo/src/main/webapp/x_host_descriptor_view_json.html?rev=1406705&r1=1406704&r2=1406705&view=diff
==============================================================================
---
airavata/sandbox/client-api-demo/src/main/webapp/x_host_descriptor_view_json.html
(original)
+++
airavata/sandbox/client-api-demo/src/main/webapp/x_host_descriptor_view_json.html
Wed Nov 7 16:24:32 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.
+ -->
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>