airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From scnakand...@apache.org
Subject [07/15] airavata-php-gateway git commit: Parallelism Prefixes added to a job submission interface<not-tested>
Date Tue, 01 Mar 2016 19:20:46 GMT
Parallelism Prefixes added to a job submission interface<not-tested>


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

Branch: refs/heads/master
Commit: a228f194629384414b17f4bc7e67fbf5320caf3d
Parents: 454abfc
Author: Nipurn Doshi <nipunhere@gmail.com>
Authored: Fri Feb 26 12:29:32 2016 -0500
Committer: Nipurn Doshi <nipunhere@gmail.com>
Committed: Fri Feb 26 12:29:32 2016 -0500

----------------------------------------------------------------------
 app/libraries/CRUtilities.php     |  14 ++--
 app/views/resource/edit.blade.php | 114 +++++++--------------------------
 2 files changed, 33 insertions(+), 95 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/a228f194/app/libraries/CRUtilities.php
----------------------------------------------------------------------
diff --git a/app/libraries/CRUtilities.php b/app/libraries/CRUtilities.php
index 9c5f349..1bd3701 100755
--- a/app/libraries/CRUtilities.php
+++ b/app/libraries/CRUtilities.php
@@ -23,6 +23,7 @@ use Airavata\Model\Data\Movement\UnicoreDataMovement;
 use Airavata\Model\AppCatalog\ComputeResource\UnicoreJobSubmission;
 use Airavata\Model\AppCatalog\GatewayProfile\ComputeResourcePreference;
 use Airavata\Model\AppCatalog\GatewayProfile\GatewayResourceProfile;
+use Airavata\Model\AppCatalog\Parallelism\ApplicationParallelismType;
 
 //Gateway Classes
 
@@ -82,6 +83,7 @@ class CRUtilities
         $dmp = new DataMovementProtocol();
         $jmc = new JobManagerCommand();
         $mm = new MonitorMode();
+        $pt = new ApplicationParallelismType();
         return array(
             "fileSystemsObject" => $files,
             "fileSystems" => $files::$__names,
@@ -94,7 +96,8 @@ class CRUtilities
             "dataMovementProtocolsObject" => $dmp,
             "dataMovementProtocols" => $dmp::$__names,
             "jobManagerCommands" => $jmc::$__names,
-            "monitorModes" => $mm::$__names
+            "monitorModes" => $mm::$__names,
+            "parallelismTypes" => $pt::$__names
         );
     }
 
@@ -142,7 +145,8 @@ class CRUtilities
                 "resourceJobManagerType" => $inputs["resourceJobManagerType"],
                 "pushMonitoringEndpoint" => $inputs["pushMonitoringEndpoint"],
                 "jobManagerBinPath" => $inputs["jobManagerBinPath"],
-                "jobManagerCommands" => $inputs["jobManagerCommands"]
+                "jobManagerCommands" => $inputs["jobManagerCommands"],
+                "parallalisimPrefix" => $inputs["parallelismPrefix"]
             ));
 
             //$rmId = $jsiObject->resourceJobManager->resourceJobManagerId;
@@ -169,7 +173,8 @@ class CRUtilities
                 "resourceJobManagerType" => $inputs["resourceJobManagerType"],
                 "pushMonitoringEndpoint" => $inputs["pushMonitoringEndpoint"],
                 "jobManagerBinPath" => $inputs["jobManagerBinPath"],
-                "jobManagerCommands" => $inputs["jobManagerCommands"]
+                "jobManagerCommands" => $inputs["jobManagerCommands"],
+                "parallalisimPrefix" => $inputs["parallelismPrefix"]
             ));
             $sshJobSubmission = new SSHJobSubmission(array
                 (
@@ -208,7 +213,8 @@ class CRUtilities
                 "resourceJobManagerType" => $inputs["resourceJobManagerType"],
                 "pushMonitoringEndpoint" => $inputs["pushMonitoringEndpoint"],
                 "jobManagerBinPath" => $inputs["jobManagerBinPath"],
-                "jobManagerCommands" => $inputs["jobManagerCommands"]
+                "jobManagerCommands" => $inputs["jobManagerCommands"],
+                "parallalisimPrefix" => $inputs["parallelismPrefix"]
             ));
             $sshJobSubmission = new SSHJobSubmission(array
                 (

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/a228f194/app/views/resource/edit.blade.php
----------------------------------------------------------------------
diff --git a/app/views/resource/edit.blade.php b/app/views/resource/edit.blade.php
index ee90041..6b0c1d4 100644
--- a/app/views/resource/edit.blade.php
+++ b/app/views/resource/edit.blade.php
@@ -223,38 +223,13 @@
                 </h4>
                 <input type="hidden" name="jobSubmissionProtocol" value="{{ $selectedJspIndex
}}"/>
                 @if( $selectedJspIndex == $jobSubmissionProtocolsObject::LOCAL)
-                <div class="select-resource-manager-type">
-                    <div class="form-group required">
-                        <label class="control-label">Select resource manager type</label>
-                        <select name="resourceJobManagerType" class="form-control selected-resource-manager"
-                                required="required">
-                            @foreach( $resourceJobManagerTypes as $index => $rJmT)
-                            <option value="{{ $index }}"
-                            @if( $JSI->resourceJobManager->resourceJobManagerType ==
$index ) selected @endif >{{ $rJmT
-                            }}</option>
-                            @endforeach
-                        </select>
-                    </div>
-                    <div class="form-group">
-                        <label class="control-label">Push Monitoring End Point</label>
-                        <input type="text" class="form-control" name="pushMonitoringEndpoint"
-                               value="{{ $JSI->resourceJobManager->pushMonitoringEndpoint
}}"/>
-                    </div>
-                    <div class="form-group">
-                        <label class="control-label">Job Manager Bin Path</label>
-                        <input type="text" class="form-control" name="jobManagerBinPath"
-                               value="{{ $JSI->resourceJobManager->jobManagerBinPath
}}"/>
-                    </div>
-                    <div class="form-group">
-                        <h3>Job Manager Commands</h3>
-                        @foreach( $jobManagerCommands as $index => $jmc)
-                        <label class="control-label">{{ $jmc }}</label>
-                        <input class="form-control" name="jobManagerCommands[{{ $index
}}]" placeholder="{{ $jmc }}"
-                               value="@if( isset( $JSI->resourceJobManager->jobManagerCommands[$index]
) ) {{ $JSI->resourceJobManager->jobManagerCommands[$index] }} @endif"/>
-                        @endforeach
-                        </select>
-                    </div>
-                </div>
+                    @include( 'partials/resource-job-manager', array(
+                                    "resourceJobManagerTypes" => $resourceJobManagerTypes,
+                                    "JSI" => $JSI,
+                                    "jobManagerCommands" => $jobManagerCommands,
+                                    "parallelismTypes" => $parallelismTypes
+                                )
+                            )
                 @elseif( $selectedJspIndex == $jobSubmissionProtocolsObject::SSH || $jobSubmissionProtocolsObject::SSH_FORK)
                 <div class="form-group required">
                     <label class="control-label">Select Security Protocol</label>
@@ -287,37 +262,14 @@
                 </div>
 
                 <div class="form-group">
-                    <div class="select-resource-manager-type">
-                        <div class="form-group required">
-                            <label class="control-label">Select resource manager type</label>
-                            <select name="resourceJobManagerType" class="form-control
selected-resource-manager"
-                                    required="required">
-                                @foreach( $resourceJobManagerTypes as $index => $rJmT)
-                                <option value="{{ $index }}"
-                                @if( $JSI->resourceJobManager->resourceJobManagerType
== $index ) selected @endif >{{
-                                $rJmT }}</option>
-                                @endforeach
-                            </select>
-                        </div>
-                        <div class="form-group">
-                            <label class="control-label">Push Monitoring End Point</label>
-                            <input type="text" class="form-control" name="pushMonitoringEndpoint"
-                                   value="{{ $JSI->resourceJobManager->pushMonitoringEndpoint
}}"/>
-                        </div>
-                        <div class="form-group">
-                            <label class="control-label">Job Manager Bin Path</label>
-                            <input type="text" class="form-control" name="jobManagerBinPath"
-                                   value="{{ $JSI->resourceJobManager->jobManagerBinPath
}}"/>
-                        </div>
-                        <div class="form-group">
-                            <h3>Job Manager Commands</h3>
-                            @foreach( $jobManagerCommands as $index => $jmc)
-                            <label class="control-label">{{ $jmc }}</label>
-                            <input class="form-control" name="jobManagerCommands[{{ $index
}}]" placeholder="{{ $jmc }}"
-                                   value="@if( isset( $JSI->resourceJobManager->jobManagerCommands[$index]
) ) {{ $JSI->resourceJobManager->jobManagerCommands[$index] }} @endif"/>
-                            @endforeach
-                        </div>
-                    </div>
+                    @include( 'partials/resource-job-manager', array(
+                                    "resourceJobManagerTypes" => $resourceJobManagerTypes,
+                                    "JSI" => $JSI,
+                                    "jobManagerCommands" => $jobManagerCommands,
+                                    "parallelismTypes" => $parallelismTypes
+                                )
+                            )
+                    
                 </div>
 
                 @elseif( $selectedJspIndex == $jobSubmissionProtocolsObject::UNICORE)
@@ -550,32 +502,12 @@
 
 
 <div class="resource-manager-block hide">
-    <div class="select-resource-manager-type">
-        <div class="form-group required">
-            <label class="control-label">Select resource manager type</label>
-            <select name="resourceJobManagerType" class="form-control selected-resource-manager"
required="required">
-                @foreach( $resourceJobManagerTypes as $index => $rJmT)
-                <option value="{{ $index }}">{{ $rJmT }}</option>
-                @endforeach
-            </select>
-        </div>
-    </div>
-    <div class="form-group">
-        <label class="control-label">Push Monitoring End Point</label>
-        <input type="text" class="form-control" name="pushMonitoringEndpoint"/>
-    </div>
-    <div class="form-group">
-        <label class="control-label">Job Manager Bin Path</label>
-        <input type="text" class="form-control" name="jobManagerBinPath"/>
-    </div>
-    <div class="form-group">
-        <h3>Job Manager Commands</h3>
-        @foreach( $jobManagerCommands as $index => $jmc)
-        <label class="control-label">{{ $jmc }}</label>
-        <input class="form-control" name="jobManagerCommands[{{ $index }}]" placeholder="{{
$jmc }}"/>
-        @endforeach
-        </select>
-    </div>
+@include( 'partials/resource-job-manager', array(
+        "resourceJobManagerTypes" => $resourceJobManagerTypes,
+        "jobManagerCommands" => $jobManagerCommands,
+        "parallelismTypes" => $parallelismTypes
+    )
+)
 </div>
 
 <div class="ssh-block hide">
@@ -667,8 +599,8 @@
                     Do you really want to delete this Job Submission Interface ?
                 </div>
                 <div class="modal-footer">
-                    <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
                     <button type="submit" class="btn btn-danger danger">Delete</button>
+                    <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
                 </div>
             </form>
 
@@ -691,8 +623,8 @@
                     Do you really want to delete this Data Movement Interface ?
                 </div>
                 <div class="modal-footer">
-                    <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
                     <button type="submit" class="btn btn-danger danger">Delete</button>
+                    <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
                 </div>
         </div>
     </div>


Mime
View raw message