airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From scnakand...@apache.org
Subject [1/2] airavata-php-gateway git commit: Airavata autoschedule pga support
Date Fri, 30 Oct 2015 21:26:12 GMT
Repository: airavata-php-gateway
Updated Branches:
  refs/heads/master da61c9867 -> 8eeb7be0f


Airavata autoschedule pga support


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/50919924
Tree: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/tree/50919924
Diff: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/diff/50919924

Branch: refs/heads/master
Commit: 50919924211597f15dc0924d3ec766b9b0b6b6ad
Parents: 7c163da
Author: scnakandala <supun.nakandala@gmail.com>
Authored: Fri Oct 30 17:26:01 2015 -0400
Committer: scnakandala <supun.nakandala@gmail.com>
Committed: Fri Oct 30 17:26:01 2015 -0400

----------------------------------------------------------------------
 app/controllers/ExperimentController.php        |  1 +
 app/libraries/ExperimentUtilities.php           |  2 ++
 app/views/partials/experiment-info.blade.php    |  4 +++
 app/views/partials/experiment-inputs.blade.php  | 12 +++++++
 .../partials/experiment-queue-block.blade.php   | 37 +++++++++++++++++---
 5 files changed, 51 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/50919924/app/controllers/ExperimentController.php
----------------------------------------------------------------------
diff --git a/app/controllers/ExperimentController.php b/app/controllers/ExperimentController.php
index e01163f..3ef331b 100755
--- a/app/controllers/ExperimentController.php
+++ b/app/controllers/ExperimentController.php
@@ -175,6 +175,7 @@ class ExperimentController extends BaseController
             "experimentName" => $experiment->experimentName,
             "experimentDescription" => $experiment->description,
             "application" => $experiment->executionId,
+            "autoSchedule" => $experiment->userConfigurationData->airavataAutoSchedule,
             "allowedFileSize" => Config::get('pga_config.airavata')["server-allowed-file-size"],
             'experiment' => $experiment,
             "queueDefaults" => $queueDefaults,

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/50919924/app/libraries/ExperimentUtilities.php
----------------------------------------------------------------------
diff --git a/app/libraries/ExperimentUtilities.php b/app/libraries/ExperimentUtilities.php
index d3bbfb2..4f997d0 100644
--- a/app/libraries/ExperimentUtilities.php
+++ b/app/libraries/ExperimentUtilities.php
@@ -145,6 +145,7 @@ class ExperimentUtilities
 
         $userConfigData = new UserConfigurationDataModel();
         $userConfigData->computationalResourceScheduling = $scheduling;
+        $userConfigData->airavataAutoSchedule = isset($_POST['enable-auto-scheduling'])
? true : false;
         if (isset($_POST["userDN"])) {
             $userConfigData->generateCert = 1;
             $userConfigData->userDN = $_POST["userDN"];
@@ -1040,6 +1041,7 @@ class ExperimentUtilities
         */
 
         $userConfigDataUpdated->computationalResourceScheduling = $schedulingUpdated;
+        $userConfigDataUpdated->airavataAutoSchedule = isset($_POST['enable-auto-scheduling'])
? true : false;
         if (isset($input["userDN"])) {
             $userConfigDataUpdated->generateCert = 1;
             $userConfigDataUpdated->userDN = $input["userDN"];

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/50919924/app/views/partials/experiment-info.blade.php
----------------------------------------------------------------------
diff --git a/app/views/partials/experiment-info.blade.php b/app/views/partials/experiment-info.blade.php
index 14e0643..91169e8 100644
--- a/app/views/partials/experiment-info.blade.php
+++ b/app/views/partials/experiment-info.blade.php
@@ -106,6 +106,10 @@
             <td class="time" unix-time="<?php echo $expVal["experimentTimeOfStateChange"];
?>"></td>
         </tr>
         <tr>
+            <td><strong>Enable Auto Schedule</strong></td>
+            <td><?php echo $experiment->userConfigurationData->airavataAutoSchedule==1?"true":"false";
?></td>
+        </tr>
+        <tr>
             <td><strong>Wall time</strong></td>
             <td><?php echo $experiment->userConfigurationData->computationalResourceScheduling->wallTimeLimit;
?></td>
         </tr>

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/50919924/app/views/partials/experiment-inputs.blade.php
----------------------------------------------------------------------
diff --git a/app/views/partials/experiment-inputs.blade.php b/app/views/partials/experiment-inputs.blade.php
index a13da15..a09bef2 100644
--- a/app/views/partials/experiment-inputs.blade.php
+++ b/app/views/partials/experiment-inputs.blade.php
@@ -60,6 +60,18 @@
             </div>
             </div>
         </div>
+
+        <div class="form-group">
+            <label class="control-label" for="enable-auto-scheduling">
+                Enable Auto Scheduling&nbsp;&nbsp;
+                    <input name="enable-auto-scheduling" id="enable-auto-scheduling" type="checkbox"
+                    @if(isset($expInputs["autoSchedule"]) && $expInputs["autoSchedule"])
+                        {{" checked"}}
+                    @endif
+                    >
+            </label>
+        </div>
+
         <div class="form-group required">
             <label class="control-label" for="compute-resource">Compute Resource</label>
             @if( count( $expInputs['computeResources']) > 0)

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/50919924/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 7ca7446..af2390b 100644
--- a/app/views/partials/experiment-queue-block.blade.php
+++ b/app/views/partials/experiment-queue-block.blade.php
@@ -78,14 +78,24 @@
         getQueueData(selectedQueue);
     });
 
+    $("#enable-auto-scheduling").change(function () {
+        var selectedQueue = $("#select-queue").val();
+        getQueueData(selectedQueue);
+    });
+
     function getQueueData(selectedQueue) {
         var queues = $.parseJSON($("#queue-array").val());
+        var veryLargeValue = 9999999;
         console.log(queues);
         for (var i = 0; i < queues.length; i++) {
             if (queues[i]['queueName'] == selectedQueue) {
                 //node-count
                 if (queues[i]['maxNodes'] != 0 && queues[i]['maxNodes'] != null)
{
-                    $("#node-count").attr("max", queues[i]['maxNodes']);
+                    if($('#enable-auto-scheduling').prop('checked')){
+                        $("#node-count").attr("max", veryLargeValue);
+                    }else{
+                        $("#node-count").attr("max", queues[i]['maxNodes']);
+                    }
                     $(".node-count").html(queues[i]['maxNodes']);
                     $(".node-count").parent().removeClass("hide");
                 }
@@ -95,7 +105,11 @@
 
                 //core-count
                 if (queues[i]['maxProcessors'] != 0 && queues[i]['maxProcessors']
!= null) {
-                    $("#cpu-count").attr("max", queues[i]['maxProcessors']);
+                    if($('#enable-auto-scheduling').prop('checked')){
+                        $("#cpu-count").attr("max", veryLargeValue);
+                    }else {
+                        $("#cpu-count").attr("max", queues[i]['maxProcessors']);
+                    }
                     $(".cpu-count").html(queues[i]['maxProcessors']);
                     $(".cpu-count").parent().removeClass("hide");
                 }
@@ -104,7 +118,11 @@
 
                 //walltime-count
                 if (queues[i]['maxRunTime'] != null && queues[i]['maxRunTime'] !=
0) {
-                    $("#wall-time").attr("max", queues[i]['maxRunTime']);
+                    if($('#enable-auto-scheduling').prop('checked')){
+                        $("#wall-time").attr("max", veryLargeValue);
+                    }else {
+                        $("#wall-time").attr("max", queues[i]['maxRunTime']);
+                    }
                     $(".walltime-count").html(queues[i]['maxRunTime']);
                     $(".walltime-count").parent().removeClass("hide");
                 }
@@ -113,7 +131,11 @@
 
                 //memory-count
                 if (queues[i]['maxMemory'] != 0 && queues[i]['maxMemory'] != null)
{
-                    $("#memory-count").attr("max", queues[i]['maxMemory']).val(0);
+                    if($('#enable-auto-scheduling').prop('checked')){
+                        $("#memory-count").attr("max", veryLargeValue);
+                    }else {
+                        $("#memory-count").attr("max", queues[i]['maxMemory']).val(0);
+                    }
                     $(".memory-count").html(queues[i]['maxMemory']);
                     $(".memory-count").parent().removeClass("hide");
                 }
@@ -134,11 +156,16 @@
         var selectedQueue = $("#select-queue").val();
         getQueueData(selectedQueue);
         $("#select-queue").change(function () {
-            var selectedQueue = $(this).val();
+            var selectedQueue = $("#select-queue").val();
             getQueueData(selectedQueue);
         });
     });
 
+    $("#enable-auto-scheduling").change(function () {
+        var selectedQueue = $("#select-queue").val();
+        getQueueData(selectedQueue);
+    });
+
     //Setting the file input view JS code
     $( document ).ready(function() {
         function readBlob(opt_startByte, opt_stopByte, fileId) {


Mime
View raw message