Repository: airavata-php-gateway
Updated Branches:
  refs/heads/develop e8ff24991 -> 922b64740


Storage Resource DMI api fix


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

Branch: refs/heads/develop
Commit: 922b647401f9d88ad45d1766395b65ee0cb726b9
Parents: e8ff249
Author: Nipurn Doshi <[email protected]>
Authored: Fri Feb 12 11:15:38 2016 -0500
Committer: Nipurn Doshi <[email protected]>
Committed: Fri Feb 12 11:15:38 2016 -0500

----------------------------------------------------------------------
 app/controllers/ComputeResourceController.php |  2 +-
 app/controllers/StorageResourceController.php | 10 +-----
 app/libraries/SRUtilities.php                 | 21 ++++++------
 app/views/resource/edit.blade.php             | 39 ++--------------------
 4 files changed, 15 insertions(+), 57 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/922b6474/app/controllers/ComputeResourceController.php
----------------------------------------------------------------------
diff --git a/app/controllers/ComputeResourceController.php 
b/app/controllers/ComputeResourceController.php
index 918070a..b930367 100755
--- a/app/controllers/ComputeResourceController.php
+++ b/app/controllers/ComputeResourceController.php
@@ -71,7 +71,7 @@ class ComputeResourceController extends BaseController
                     $addedDMI[] = $DMI->dataMovementProtocol;
                 }
             }
-
+            
             $data["computeResource"] = $computeResource;
             $data["jobSubmissionInterfaces"] = $jobSubmissionInterfaces;
             $data["dataMovementInterfaces"] = $dataMovementInterfaces;

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/922b6474/app/controllers/StorageResourceController.php
----------------------------------------------------------------------
diff --git a/app/controllers/StorageResourceController.php 
b/app/controllers/StorageResourceController.php
index 5b26a2e..a54639a 100644
--- a/app/controllers/StorageResourceController.php
+++ b/app/controllers/StorageResourceController.php
@@ -73,7 +73,6 @@ class StorageresourceController extends BaseController
 
     public function editSubmit()
     {   
-        var_dump( Input::all() ); exit;
         $this->beforeFilter('verifyeditadmin');
         $tabName = "";
         if (Input::get("sr-edit") == "resDesc") /* Modify storage Resource 
description */ {
@@ -161,15 +160,8 @@ class StorageresourceController extends BaseController
     {
         $this->beforeFilter('verifyeditadmin');
         $result = SRUtilities::deleteActions(Input::all());
-        var_dump($result);exit;
-        /*
-        if (Input::has("jsiId")) {
-            return Redirect::to("cr/edit?crId=" . Input::get("crId") . 
"#tab-jobSubmission")
-                ->with("message", "Job Submission Interface was deleted 
successfully");
-        }
-        */
         if (Input::has("dmiId")) {
-            return Redirect::to("sr/edit?crId=" . Input::get("crId") . 
"#tab-dataMovement")
+            return Redirect::to("sr/edit?srId=" . Input::get("srId") . 
"#tab-dataMovement")
                 ->with("message", "Data Movement Protocol was deleted 
successfully");
         } elseif (Input::has("del-srId")) {
             return Redirect::to("sr/browse")->with("message", "The Compute 
Resource has been successfully deleted.");

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/922b6474/app/libraries/SRUtilities.php
----------------------------------------------------------------------
diff --git a/app/libraries/SRUtilities.php b/app/libraries/SRUtilities.php
index 8e22044..a371d90 100644
--- a/app/libraries/SRUtilities.php
+++ b/app/libraries/SRUtilities.php
@@ -183,32 +183,31 @@ class SRUtilities
 
     public static function deleteActions($inputs)
     {
-        if (isset($inputs["crId"])) {
+        if (isset($inputs["srId"])) {
             if 
(Config::get('pga_config.airavata')['enable-app-catalog-cache']) {
-                if (Cache::has('CR-' . $inputs["crId"])) {
-                    Cache::forget('CR-' . $inputs["crId"]);
+                if (Cache::has('SR-' . $inputs["srId"])) {
+                    Cache::forget('SR-' . $inputs["srId"]);
                 }
             }
-        } elseif (isset($inputs["del-crId"])) {
+        } elseif (isset($inputs["del-srId"])) {
             if 
(Config::get('pga_config.airavata')['enable-app-catalog-cache']) {
-                if (Cache::has('CR-' . $inputs["del-crId"])) {
-                    Cache::forget('CR-' . $inputs["del-crId"]);
+                if (Cache::has('SR-' . $inputs["del-srId"])) {
+                    Cache::forget('SR-' . $inputs["del-srId"]);
                 }
             }
         }
-
         if (isset($inputs["jsiId"]))
-            if 
(Airavata::deleteJobSubmissionInterface(Session::get('authz-token'), 
$inputs["crId"], $inputs["jsiId"]))
+            if 
(Airavata::deleteJobSubmissionInterface(Session::get('authz-token'), 
$inputs["srId"], $inputs["jsiId"]))
                 return 1;
             else
                 return 0;
         else if (isset($inputs["dmiId"]))
-            if 
(Airavata::deleteDataMovementInterface(Session::get('authz-token'), 
$inputs["crId"], $inputs["dmiId"]))
+            if 
(Airavata::deleteDataMovementInterface(Session::get('authz-token'), 
$inputs["srId"], $inputs["dmiId"]))
                 return 1;
             else
                 return 0;
-        elseif (isset($inputs["del-crId"]))
-            if (Airavata::deleteComputeResource(Session::get('authz-token'), 
$inputs["del-crId"]))
+        elseif (isset($inputs["del-srId"]))
+            if (Airavata::deleteComputeResource(Session::get('authz-token'), 
$inputs["del-srId"]))
                 return 1;
             else
                 return 0;

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/922b6474/app/views/resource/edit.blade.php
----------------------------------------------------------------------
diff --git a/app/views/resource/edit.blade.php 
b/app/views/resource/edit.blade.php
index 7ba4705..1d44e3e 100644
--- a/app/views/resource/edit.blade.php
+++ b/app/views/resource/edit.blade.php
@@ -202,10 +202,9 @@
         @endif
     </div>
 
-    @if( count( $jobSubmissionInterfaces ) )
+    @if( count( $jobSubmissionInterfaces ) > 0)
     <div class="job-edit-info">
         @foreach( $jobSubmissionInterfaces as $index => $JSI )
-
         <div class="job-protocol-block">
             <form role="form" method="POST" action="{{ URL::to('/') 
}}/cr/edit">
                 <input type="hidden" name="crId" value="{{Input::get('crId') 
}}"/>
@@ -415,17 +414,7 @@
                         @endforeach
                     </select>
                 </div>
-<!--
-                <div class="form-group">
-                    <label class="control-label">Select Monitoring Mode</label>
-                    <select name="monitorMode">
-                        @foreach( $monitorModes as $index => $mode)
-                        <option value="{{ $index }}"
-                        @if( $JSI->monitorMode == $index ) selected @endif>{{ 
$mode}}</option>
-                        @endforeach
-                    </select>
-                </div>
--->
+
                 <div class="form-group">
                     <label class="control-label">Alternate SSH Host 
Name</label>
                     <input class='form-control' name='alternativeSSHHostName'
@@ -448,17 +437,6 @@
                         @endforeach
                     </select>
                 </div>
-<!--
-                <div class="form-group">
-                    <label class="control-label">Select Monitoring Mode</label>
-                    <select name="monitorMode">
-                        @foreach( $monitorModes as $index => $mode)
-                        <option value="{{ $index }}"
-                        @if( $JSI->monitorMode == $index ) selected @endif>{{ 
$mode}}</option>
-                        @endforeach
-                    </select>
-                </div>
--->
 
                 <div>
                     <div class="form-group required">
@@ -485,18 +463,7 @@
                         @endforeach
                     </select>
                 </div>
-<!--
-                <div class="form-group">
-                    <label class="control-label">Select Monitoring Mode</label>
-                    <select name="monitorMode">
-                        @foreach( $monitorModes as $index => $mode)
-                        <option value="{{ $index }}"
-                        @if( $JSI->monitorMode == $index ) selected @endif>{{ 
$mode}}</option>
-                        @endforeach
-                    </select>
-                </div>
--->
-
+                
                 <div>
                     <div class="form-group required">
                         <label class="control-label">Unicore End Point 
URL</label>

Reply via email to