Repository: airavata-php-gateway Updated Branches: refs/heads/develop 14fbad604 -> 20ef18aa7
WIP 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/20ef18aa Tree: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/tree/20ef18aa Diff: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/diff/20ef18aa Branch: refs/heads/develop Commit: 20ef18aa7e1a93eed795d951100d0b08ef9e66fa Parents: 14fbad6 Author: scnakandala <[email protected]> Authored: Mon May 22 15:45:14 2017 -0400 Committer: scnakandala <[email protected]> Committed: Mon May 22 15:45:14 2017 -0400 ---------------------------------------------------------------------- .../partials/experiment-queue-block.blade.php | 52 +++++++++----------- 1 file changed, 24 insertions(+), 28 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/20ef18aa/app/views/partials/experiment-queue-block.blade.php ---------------------------------------------------------------------- diff --git a/app/views/partials/experiment-queue-block.blade.php b/app/views/partials/experiment-queue-block.blade.php index 6ab967f..1958578 100644 --- a/app/views/partials/experiment-queue-block.blade.php +++ b/app/views/partials/experiment-queue-block.blade.php @@ -221,13 +221,6 @@ $("#walltime-count").val(queueDefaults['wallTimeLimit']); } - if(queues[i]['cpusPerNode'] > 0){ - var cpusPerNode = queues[i]['cpusPerNode']; - }else{ - var cpusPerNode = queueDefaults['cpusPerNode']; - } - - //memory-count if (queues[i]['maxMemory'] != 0 && queues[i]['maxMemory'] != null) { if($('#enable-auto-scheduling').prop('checked')){ @@ -240,30 +233,33 @@ } else $(".memory-count").parent().addClass("hide"); - } - } - $(".queue-view").removeClass("hide"); - } - $(document).ready(function(){ - var cpusPerNode = {{$cpusPerNode}}; - var nodeCount=$("#node-count"); - var cpuCount=$("#cpu-count"); - - if(cpusPerNode > 0){ - nodeCount.keyup(function(){ - var nodeCountVal = parseInt(nodeCount.val()); - if(nodeCountVal > 0){ - cpuCount.val(nodeCountVal*cpusPerNode); + if(queues[i]['cpusPerNode'] > 0){ + var cpusPerNode = queues[i]['cpusPerNode']; + }else{ + var cpusPerNode = queueDefaults['cpusPerNode']; } - }); - cpuCount.keyup(function(){ - var cpuCountVal = parseInt(cpuCount.val()); - if(cpuCountVal > 0){ - nodeCount.val(Math.ceil(cpuCountVal/cpusPerNode)); + var nodeCount=$("#node-count"); + var cpuCount=$("#cpu-count"); + + if(cpusPerNode > 0){ + nodeCount.keyup(function(){ + var nodeCountVal = parseInt(nodeCount.val()); + if(nodeCountVal > 0){ + cpuCount.val(nodeCountVal*cpusPerNode); + } + }); + + cpuCount.keyup(function(){ + var cpuCountVal = parseInt(cpuCount.val()); + if(cpuCountVal > 0){ + nodeCount.val(Math.ceil(cpuCountVal/cpusPerNode)); + } + }); } - }); + } } - }); + $(".queue-view").removeClass("hide"); + } </script> \ No newline at end of file
