Skip to content
Permalink
Browse files
fixing queue names not updating issue in create app deployment
  • Loading branch information
scnakandala committed Jul 27, 2017
1 parent 2a13943 commit e7d14075ac36b4c5744418effe33ae6b270b75dc
Showing 1 changed file with 8 additions and 8 deletions.
@@ -71,23 +71,23 @@ $( document).ready( function(){
$(".delete-deploymentId").val( deploymentId )
});

updateQueueNamesForCreateAppDep();
updateQueueNamesForCreateAppDep($('#create-app-deployment-block .computeHostId').filter(":selected").val());
$("#create-app-deployment-block").on('change', '.computeHostId', function () {
updateQueueNamesForCreateAppDep();
updateQueueNamesForCreateAppDep(this.value);
});

updateQueueNamesForEditAppDep();
updateQueueNamesForEditAppDep($('#edit-app-deployment-block .computeHostId').filter(":selected").val());
$("#edit-app-deployment-block").on('change', '.computeHostId', function () {
updateQueueNamesForEditAppDep();
updateQueueNamesForEditAppDep(this.value);
});
});

function updateQueueNamesForCreateAppDep(){
function updateQueueNamesForCreateAppDep(selectedVal){
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)){
if(computeResource.computeResourceId.startsWith(selectedVal)){
queues = computeResource.batchQueues;
if(queues != null){
for(j=0; j<queues.length; j++){
@@ -99,13 +99,13 @@ function updateQueueNamesForCreateAppDep(){
}
}

function updateQueueNamesForEditAppDep(){
function updateQueueNamesForEditAppDep(selectedVal){
var computeResourceCompleteList = $.parseJSON($("#compute-resource-full-objects").val());
var appDeploymentObject = $.parseJSON($("#app-deployment-object").val());
$('#edit-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)){
if(computeResource.computeResourceId.startsWith(selectedVal)){
queues = computeResource.batchQueues;
if(queues != null){
for(j=0; j<queues.length; j++){

0 comments on commit e7d1407

Please sign in to comment.