You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by ma...@apache.org on 2017/08/09 14:50:43 UTC

[44/50] airavata-php-gateway git commit: fixing queue names not updating issue in create app deployment

fixing queue names not updating issue in create app deployment


Project: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/commit/355cb758
Tree: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/tree/355cb758
Diff: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/diff/355cb758

Branch: refs/heads/dreg-gateway
Commit: 355cb7586df9ae3b1fecb5297df6a82495d855e7
Parents: 3a3059a
Author: scnakandala <su...@gmail.com>
Authored: Thu Jul 27 12:09:37 2017 -0400
Committer: scnakandala <su...@gmail.com>
Committed: Thu Jul 27 12:09:37 2017 -0400

----------------------------------------------------------------------
 public/js/deployment.js | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/355cb758/public/js/deployment.js
----------------------------------------------------------------------
diff --git a/public/js/deployment.js b/public/js/deployment.js
index 6f30e3d..a895193 100644
--- a/public/js/deployment.js
+++ b/public/js/deployment.js
@@ -71,6 +71,23 @@ $( document).ready( function(){
         	$(".delete-deploymentId").val( deploymentId )
         });
 
+	$("#create-app-deployment-block").on('change', '.computeHostId', function () {
+		var computeResourceCompleteList = $.parseJSON($("#compute-resource-full-objects").val());
+		$('#create-app-deployment-block .default-queue-name-select').find('option').remove();
+		for(i = 0; i< computeResourceCompleteList.length; i++){
+			computeResource = computeResourceCompleteList[i];
+			if(computeResource.computeResourceId.startsWith(this.value)){
+				queues = computeResource.batchQueues;
+				if(queues != null){
+					for(j=0; j<queues.length; j++){
+						queue = queues[j];
+						$("#create-app-deployment-block .default-queue-name-select").append("<option value="+queue.queueName+">"+queue.queueName+"</option>");
+					}
+				}
+			}
+		}
+	});
+
 	$("#edit-app-deployment-block").on('change', '.computeHostId', function () {
 		var computeResourceCompleteList = $.parseJSON($("#compute-resource-full-objects").val());
 		var appDeploymentObject = $.parseJSON($("#app-deployment-object").val());