airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sma...@apache.org
Subject [20/33] airavata-php-gateway git commit: Storage Resources implementation on PGA completed.
Date Fri, 04 Dec 2015 19:56:44 GMT
Storage Resources implementation on PGA completed.


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

Branch: refs/heads/master
Commit: a3a066fadf61ec05d9be165471d8bcad68526fe0
Parents: cce4225
Author: Nipurn Doshi <Nipurn Doshi>
Authored: Fri Nov 20 14:15:27 2015 -0500
Committer: Nipurn Doshi <Nipurn Doshi>
Committed: Fri Nov 20 14:15:27 2015 -0500

----------------------------------------------------------------------
 app/controllers/ExperimentController.php       |   5 +-
 app/controllers/ResourceController.php         |   2 +-
 app/controllers/StorageresourceController.php  |  71 +-
 app/libraries/ExperimentUtilities.php          | 114 +++-
 app/libraries/SRUtilities.php                  | 223 +------
 app/views/layout/fixed-scripts.blade.php       |   2 +
 app/views/partials/dashboard-block.blade.php   |   4 +-
 app/views/partials/experiment-info.blade.php   | 135 +++-
 app/views/partials/experiment-inputs.blade.php |   2 +-
 app/views/resource/edit.blade.php              |  25 +-
 app/views/storage-resource/browse.blade.php    |  16 +-
 app/views/storage-resource/edit.blade.php      | 706 +++++---------------
 12 files changed, 443 insertions(+), 862 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/a3a066fa/app/controllers/ExperimentController.php
----------------------------------------------------------------------
diff --git a/app/controllers/ExperimentController.php b/app/controllers/ExperimentController.php
index f62de7d..ebe870b 100755
--- a/app/controllers/ExperimentController.php
+++ b/app/controllers/ExperimentController.php
@@ -80,6 +80,8 @@ class ExperimentController extends BaseController
     public function summary()
     {
         $experiment = ExperimentUtilities::get_experiment($_GET['expId']);
+        $detailedExperiment = ExperimentUtilities::get_detailed_experiment( $_GET['expId']);
+        //var_dump( $detailedExperiment); exit;
         if ($experiment != null) {
             $project = ProjectUtilities::get_project($experiment->projectId);
             $expVal = ExperimentUtilities::get_experiment_values($experiment, $project);
@@ -115,7 +117,8 @@ class ExperimentController extends BaseController
                 "experiment" => $experiment,
                 "project" => $project,
                 "jobDetails" => $jobDetails,
-                "expVal" => $expVal
+                "expVal" => $expVal,
+                "detailedExperiment" => $detailedExperiment
             );
 
             if (Request::ajax()) {

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/a3a066fa/app/controllers/ResourceController.php
----------------------------------------------------------------------
diff --git a/app/controllers/ResourceController.php b/app/controllers/ResourceController.php
index 4c658c0..91530a2 100755
--- a/app/controllers/ResourceController.php
+++ b/app/controllers/ResourceController.php
@@ -9,7 +9,6 @@ class ResourceController extends BaseController
 
     public function __construct()
     {
-        print_r("test"); exit;
         $this->beforeFilter('verifyadmin');
         Session::put("nav-active", "compute-resource");
 
@@ -38,6 +37,7 @@ class ResourceController extends BaseController
 
     public function editView()
     {
+
         $data = CRUtilities::getEditCRData();
         $computeResourceId = "";
         if (Input::has("crId"))

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/a3a066fa/app/controllers/StorageresourceController.php
----------------------------------------------------------------------
diff --git a/app/controllers/StorageresourceController.php b/app/controllers/StorageresourceController.php
index 70ee281..0ec4c6e 100644
--- a/app/controllers/StorageresourceController.php
+++ b/app/controllers/StorageresourceController.php
@@ -28,7 +28,7 @@ class StorageresourceController extends BaseController
         //Compute resource is by default enabled
         $storageDescription = array(
             "hostName" => trim(Input::get("hostname")),
-            "storageResourceDescription" => trim(Input::get("hostname")),
+            "storageResourceDescription" => trim(Input::get("description")),
             "enabled" => true
         );
         $storageResource = SRUtilities::register_or_update_storage_resource($storageDescription);
@@ -52,17 +52,18 @@ class StorageresourceController extends BaseController
             $dataMovementInterfaces = array();
             $addedDMI = array();
             //var_dump( CRUtilities::getJobSubmissionDetails( $data["computeResource"]->jobSubmissionInterfaces[0]->jobSubmissionInterfaceId, 1) ); exit;
+            
             if (count($storageResource->dataMovementInterfaces)) {
                 foreach ($storageResource->dataMovementInterfaces as $DMI) {
                     $dataMovementInterfaces[] = SRUtilities::getDataMovementDetails($DMI->dataMovementInterfaceId, $DMI->dataMovementProtocol);
                     $addedDMI[] = $DMI->dataMovementProtocol;
                 }
             }
-
+            
             $data["storageResource"] = $storageResource;
             $data["dataMovementInterfaces"] = $dataMovementInterfaces;
             $data["addedDMI"] = $addedDMI;
-            return View::make("resource/edit", $data);
+            return View::make("storage-resource/edit", $data);
         } else{
             Session::put("message", "Unable to retrieve this Storage Resource. Please try again later or submit a bug report using the link in the Help menu.");
             return View::make("storage-resource/browse");
@@ -80,69 +81,21 @@ class StorageresourceController extends BaseController
             $storageResourceDescription->resourceDescription = Input::get("description");
             //var_dump( $computeDescription); exit;
 
-            $storageResource = SRUtilities::register_or_update_compute_resource($storageResourceDescription, true);
+            $storageResource = SRUtilities::register_or_update_storage_resource($storageResourceDescription, true);
 
             $tabName = "#tab-desc";
         }
-        /*
-        if (Input::get("sr-edit") == "queue"){
-            $queue = array("queueName" => Input::get("qname"),
-                "queueDescription" => Input::get("qdesc"),
-                "maxRunTime" => Input::get("qmaxruntime"),
-                "maxNodes" => Input::get("qmaxnodes"),
-                "maxProcessors" => Input::get("qmaxprocessors"),
-                "maxJobsInQueue" => Input::get("qmaxjobsinqueue"),
-                "maxMemory" => Input::get("qmaxmemoryinqueue")
-            );
-
-            $storageResourceDescription = SRUtilities::get_storage_resource(Input::get("crId"));
-            $storageResourceDescription->batchQueues[] = CRUtilities::createQueueObject($queue);
-            $computeResource = CRUtilities::register_or_update_compute_resource($computeDescription, true);
-            //var_dump( $computeResource); exit;
-            $tabName = "#tab-queues";
-        } else if (Input::get("cr-edit") == "delete-queue") {
-            CRUtilities::deleteQueue(Input::get("crId"), Input::get("queueName"));
-            $tabName = "#tab-queues";
-        } else if (Input::get("cr-edit") == "fileSystems") {
-            $computeDescription = CRUtilities::get_compute_resource(Input::get("crId"));
-            $computeDescription->fileSystems = array_filter(Input::get("fileSystems"), "trim");
-            $computeResource = CRUtilities::register_or_update_compute_resource($computeDescription, true);
-
-            $tabName = "#tab-filesystem";
-        } else if (Input::get("cr-edit") == "jsp" || Input::get("cr-edit") == "edit-jsp")  {
-            $update = false;
-            if (Input::get("cr-edit") == "edit-jsp")
-                $update = true;
-
-            $jobSubmissionInterface = CRUtilities::create_or_update_JSIObject(Input::all(), $update);
-
-            $tabName = "#tab-jobSubmission";
-        } else if (Input::get("cr-edit") == "jsi-priority") {
-            $inputs = Input::all();
-            $computeDescription = CRUtilities::get_compute_resource(Input::get("crId"));
-            foreach ($computeDescription->jobSubmissionInterfaces as $index => $jsi) {
-                foreach ($inputs["jsi-id"] as $idIndex => $jsiId) {
-                    if ($jsiId == $jsi->jobSubmissionInterfaceId) {
-                        $computeDescription->jobSubmissionInterfaces[$index]->priorityOrder = $inputs["jsi-priority"][$idIndex];
-                        break;
-                    }
-                }
-            }
-            $computeResource = CRUtilities::register_or_update_compute_resource($computeDescription, true);
 
-            return 1; //currently done by ajax.
-        } else
-        */
-        if (Input::get("cr-edit") == "dmp" || Input::get("cr-edit") == "edit-dmi") /* Add / Modify a Data Movement Interface */ {
+        if (Input::get("sr-edit") == "dmp" || Input::get("sr-edit") == "edit-dmi") /* Add / Modify a Data Movement Interface */ {
             $update = false;
-            if (Input::get("cr-edit") == "edit-dmi")
+            if (Input::get("sr-edit") == "edit-dmi")
                 $update = true;
             $dataMovementInterface = SRUtilities::create_or_update_DMIObject(Input::all(), $update);
 
             $tabName = "#tab-dataMovement";
-        } else if (Input::get("cr-edit") == "dmi-priority") {
+        } else if (Input::get("sr-edit") == "dmi-priority") {
             $inputs = Input::all();
-            $storageDescription = CRUtilities::get_storage_resource(Input::get("srId"));
+            $storageDescription = SRUtilities::get_storage_resource(Input::get("srId"));
             foreach ($storageDescription->dataMovementInterfaces as $index => $dmi) {
                 foreach ($inputs["dmi-id"] as $idIndex => $dmiId) {
                     if ($dmiId == $dmi->dataMovementInterfaceId) {
@@ -151,12 +104,12 @@ class StorageresourceController extends BaseController
                     }
                 }
             }
-            $storageResource = CRUtilities::register_or_update_storage_resource($storageDescription, true);
+            $storageResource = SRUtilities::register_or_update_storage_resource($storageDescription, true);
 
             return 1; //currently done by ajax.
         }
 
-        return Redirect::to("se/edit?srId=" . Input::get("srId") . $tabName);
+        return Redirect::to("sr/edit?srId=" . Input::get("srId") . $tabName);
     }
 
     public function viewView()
@@ -227,7 +180,7 @@ class StorageresourceController extends BaseController
         $data = SRUtilities::getBrowseSRData(false);
         $allSRs = $data["srObjects"];
 
-        Session::put("admin-nav", "cr-browse");
+        Session::put("admin-nav", "sr-browse");
         return View::make("storage-resource/browse", array(
             "allSRs" => $allSRs
         ));

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/a3a066fa/app/libraries/ExperimentUtilities.php
----------------------------------------------------------------------
diff --git a/app/libraries/ExperimentUtilities.php b/app/libraries/ExperimentUtilities.php
index adc23f8..77d9011 100644
--- a/app/libraries/ExperimentUtilities.php
+++ b/app/libraries/ExperimentUtilities.php
@@ -11,6 +11,7 @@ use Airavata\Model\Application\Io\InputDataObjectType;
 use Airavata\Model\Scheduling\ComputationalResourceSchedulingModel;
 use Airavata\Model\Experiment\ExperimentModel;
 use Airavata\Model\Status\ExperimentState;
+use Airavata\Model\Status\ProcessState;
 use Airavata\Model\Status\JobState;
 use Airavata\Model\Experiment\UserConfigurationDataModel;
 
@@ -54,12 +55,9 @@ class ExperimentUtilities
      * List the experiment's input files
      * @param $experiment
      */
-    public static function list_input_files($experiment)
+    public static function list_input_files($experimentInputs)
     {
-        $applicationInputs = AppUtilities::get_application_inputs($experiment->executionId);
-
-        $experimentInputs = $experiment->experimentInputs;
-
+        //$experimentInputs = $experiment->experimentInputs;
 
         //showing experiment inputs in the order defined by the admins.
         $order = array();
@@ -127,6 +125,44 @@ class ExperimentUtilities
     }
 
     /**
+     * Get the detailed tree of an experiment with the given ID
+     * @param $expId
+     * @return null
+     */
+    public static function get_detailed_experiment($expId)
+    {
+
+        try {
+            return Airavata::getDetailedExperimentTree(Session::get('authz-token'), $expId);
+        } catch (InvalidRequestException $ire) {
+            CommonUtilities::print_error_message('<p>There was a problem getting the experiment.
+            Please try again later or submit a bug report using the link in the Help menu.</p>' .
+                '<p>InvalidRequestException: ' . $ire->getMessage() . '</p>');
+        } catch (ExperimentNotFoundException $enf) {
+            CommonUtilities::print_error_message('<p>There was a problem getting the experiment.
+            Please try again later or submit a bug report using the link in the Help menu.</p>' .
+                '<p>ExperimentNotFoundException: ' . $enf->getMessage() . '</p>');
+        } catch (AiravataClientException $ace) {
+            CommonUtilities::print_error_message('<p>There was a problem getting the experiment.
+            Please try again later or submit a bug report using the link in the Help menu.</p>' .
+                '<p>AiravataClientException: ' . $ace->getMessage() . '</p>');
+        } catch (AiravataSystemException $ase) {
+            CommonUtilities::print_error_message('<p>There was a problem getting the experiment.
+            Please try again later or submit a bug report using the link in the Help menu.</p>' .
+                '<p>AiravataSystemException: ' . $ase->getMessage() . '</p>');
+        } catch (TTransportException $tte) {
+            CommonUtilities::print_error_message('<p>There was a problem getting the experiment.
+            Please try again later or submit a bug report using the link in the Help menu.</p>' .
+                '<p>TTransportException: ' . $tte->getMessage() . '</p>');
+        } catch (Exception $e) {
+            CommonUtilities::print_error_message('<p>There was a problem getting the experiment.
+            Please try again later or submit a bug report using the link in the Help menu.</p>' .
+                '<p>Exception: ' . $e->getMessage() . '</p>');
+        }
+
+    }
+
+    /**
      * Create and configure a new Experiment
      * @return Experiment
      */
@@ -609,41 +645,47 @@ class ExperimentUtilities
      *
     */
 
-    public static function list_output_files($experiment, $expStatus)
+    public static function list_output_files($outputs, $status, $process)
     {
-
-        $expStatusVal = array_search($expStatus, ExperimentState::$__names);
-
-        if ($expStatusVal == ExperimentState::COMPLETED) {
-            $experimentOutputs = $experiment->experimentOutputs;
-
-            foreach ((array)$experimentOutputs as $output) {
-                if ($output->type == DataType::URI || $output->type == DataType::STDOUT || $output->type == DataType::STDERR) {
-                    $explode = explode('/', $output->value);
-                    //echo '<p>' . $output->key .  ': <a href="' . $output->value . '">' . $output->value . '</a></p>';
-                    $outputPath = str_replace(Config::get('pga_config.airavata')['experiment-data-absolute-path'], Config::get('pga_config.airavata')['experiment-data-dir'], $output->value);
-                    //print_r( $output->value); 
-                    if(file_exists(str_replace('//','/',$output->value))){
-                        $outputPathArray = explode("/", $outputPath);
-
-                        echo '<p>' . $output->name . ' : ' . '<a target="_blank"
-                                href="' . URL::to("/") . '/download/' . $outputPathArray[ count($outputPathArray)-2] . '/' . 
-                $outputPathArray[ count($outputPathArray)-1] . '">' .
-                            $outputPathArray[sizeof($outputPathArray) - 1] . ' <span class="glyphicon glyphicon-new-window"></span></a></p>';
-                    }
-                    else
-                        echo 'Output paths are not correctly defined for : <br/>' . $output->name . '<br/><br/> Please report this issue to the admin<br/><br/>';
-                
-                } 
-                elseif ($output->type == DataType::STRING) {
-                    echo '<p>' . $output->value . '</p>';
+        if( $process)
+        {
+            $processStatusVal = array_search($status, ProcessState::$__names);
+            if ($processStatusVal != ProcessState::COMPLETED)
+            echo "Process hasn't completed. Process Status is : " . $status . '<br/>';
+        }
+        else
+        {
+            $expStatusVal = array_search($status, ExperimentState::$__names);
+            if ($expStatusVal != ExperimentState::COMPLETED)
+            echo "Experiment hasn't completed. Experiment Status is : " . $status . '<br/>';
+        }
+        //$outputs = $experiment->experimentOutputs;
+        //print_r( $outputs); exit;
+        foreach ((array)$outputs as $output) {
+            if ($output->type == DataType::URI || $output->type == DataType::STDOUT || $output->type == DataType::STDERR) {
+                $explode = explode('/', $output->value);
+                //echo '<p>' . $output->key .  ': <a href="' . $output->value . '">' . $output->value . '</a></p>';
+                $outputPath = str_replace(Config::get('pga_config.airavata')['experiment-data-absolute-path'], Config::get('pga_config.airavata')['experiment-data-dir'], $output->value);
+                //print_r( $output->value); 
+                if(file_exists(str_replace('//','/',$output->value))){
+                    $outputPathArray = explode("/", $outputPath);
+
+                    echo '<p>' . $output->name . ' : ' . '<a target="_blank"
+                            href="' . URL::to("/") . '/download/' . $outputPathArray[ count($outputPathArray)-2] . '/' . 
+            $outputPathArray[ count($outputPathArray)-1] . '">' .
+                        $outputPathArray[sizeof($outputPathArray) - 1] . ' <span class="glyphicon glyphicon-new-window"></span></a></p>';
                 }
                 else
-                    echo 'output : '. $output;
-                //echo 'output-type : ' . $output->type;
+                    echo 'Output paths are not correctly defined for : <br/>' . $output->name . '<br/><br/> Please report this issue to the admin<br/><br/>';
+            
+            } 
+            elseif ($output->type == DataType::STRING) {
+                echo '<p>' . $output->value . '</p>';
             }
-        } else
-            echo "Experiment hasn't completed. Experiment Status is : " . $expStatus;
+            else
+                echo 'output : '. $output;
+            //echo 'output-type : ' . $output->type;
+        }
     }
 
     public static function get_experiment_summary_values($experimentSummary, $forSearch = false)

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/a3a066fa/app/libraries/SRUtilities.php
----------------------------------------------------------------------
diff --git a/app/libraries/SRUtilities.php b/app/libraries/SRUtilities.php
index 491eccf..2e64ca6 100644
--- a/app/libraries/SRUtilities.php
+++ b/app/libraries/SRUtilities.php
@@ -8,6 +8,18 @@ use Airavata\Model\AppCatalog\StorageResource\StorageResourceDescription;
 use Airavata\Model\AppCatalog\GatewayProfile\ComputeResourcePreference;
 use Airavata\Model\AppCatalog\GatewayProfile\GatewayResourceProfile;
 
+use Airavata\Model\AppCatalog\ComputeResource\GridFTPDataMovement;
+use Airavata\Model\AppCatalog\ComputeResource\JobManagerCommand;
+use Airavata\Model\AppCatalog\ComputeResource\JobSubmissionProtocol;
+use Airavata\Model\AppCatalog\ComputeResource\LOCALDataMovement;
+use Airavata\Model\AppCatalog\ComputeResource\LOCALSubmission;
+use Airavata\Model\AppCatalog\ComputeResource\MonitorMode;
+use Airavata\Model\AppCatalog\ComputeResource\ResourceJobManager;
+use Airavata\Model\AppCatalog\ComputeResource\ResourceJobManagerType;
+use Airavata\Model\AppCatalog\ComputeResource\SCPDataMovement;
+use Airavata\Model\AppCatalog\ComputeResource\SecurityProtocol;
+use Airavata\Model\AppCatalog\ComputeResource\SSHJobSubmission;
+use Airavata\Model\AppCatalog\ComputeResource\UnicoreDataMovement;
 //Gateway Classes
 
 
@@ -25,16 +37,11 @@ class SRUtilities
     public static function register_or_update_storage_resource($storageResourceDesc, $update = false)
     {
         if ($update) {
-            $storageResourceId = $storageDescription->storageResourceId;
-            if (Config::get('pga_config.airavata')['enable-app-catalog-cache']) {
-                if (Cache::has('CR-' . $computeResourceId)) {
-                    Cache::forget('CR-' . $computeResourceId);
-                }
-            }
-
-            if (Airavata::updateComputeResource(Session::get('authz-token'), $computeResourceId, $computeDescription)) {
-                $computeResource = Airavata::getComputeResource(Session::get('authz-token'), $computeResourceId);
-                return $computeResource;
+            $storageResourceId = $storageResourceDesc->storageResourceId;
+            
+            if (Airavata::updateStorageResource(Session::get('authz-token'), $storageResourceId, $storageResourceDesc)) {
+                $storageResource = Airavata::getStorageResource(Session::get('authz-token'), $storageResourceId);
+                return $storageResource;
             } else
                 print_r("Something went wrong while updating!");
             exit;
@@ -53,210 +60,47 @@ class SRUtilities
 
     public static function getEditSRData()
     {
+        $rjmt = new ResourceJobManagerType();
+        $sp = new SecurityProtocol();
         $dmp = new DataMovementProtocol();
+        $jmc = new JobManagerCommand();
+        $mm = new MonitorMode();
         return array(
+            "resourceJobManagerTypesObject" => $rjmt,
+            "resourceJobManagerTypes" => $rjmt::$__names,
+            "securityProtocolsObject" => $sp,
+            "securityProtocols" => $sp::$__names,
             "dataMovementProtocolsObject" => $dmp,
-            "dataMovementProtocols" => $dmp::$__names
+            "dataMovementProtocols" => $dmp::$__names,
+            "jobManagerCommands" => $jmc::$__names,
+            "monitorModes" => $mm::$__names
         );
     }
 
-
-    /*
-    public static function createQueueObject($queue)
-    {
-        $queueObject = new BatchQueue($queue);
-        return $queueObject;
-    }
-
-    public static function deleteQueue($computeResourceId, $queueName)
-    {
-        if (Config::get('pga_config.airavata')['enable-app-catalog-cache']) {
-            if (Cache::has('CR-' . $computeResourceId)) {
-                Cache::forget('CR-' . $computeResourceId);
-            }
-        }
-        Airavata::deleteBatchQueue(Session::get('authz-token'), $computeResourceId, $queueName);
-    }
-
-    public static function create_or_update_JSIObject($inputs, $update = false)
-    {
-
-        $computeResource = CRUtilities::get_compute_resource($inputs["crId"]);
-
-        if (Config::get('pga_config.airavata')['enable-app-catalog-cache']) {
-            if (Cache::has('CR-' . $inputs["crId"])) {
-                Cache::forget('CR-' . $inputs["crId"]);
-            }
-        }
-
-        $jsiId = null;
-        if (isset($inputs["jsiId"]))
-            $jsiId = $inputs["jsiId"];
-
-        if ($inputs["jobSubmissionProtocol"] == JobSubmissionProtocol::LOCAL) {
-
-            //print_r( $jsiObject->resourceJobManager->resourceJobManagerId);
-            $resourceManager = new ResourceJobManager(array(
-                "resourceJobManagerType" => $inputs["resourceJobManagerType"],
-                "pushMonitoringEndpoint" => $inputs["pushMonitoringEndpoint"],
-                "jobManagerBinPath" => $inputs["jobManagerBinPath"],
-                "jobManagerCommands" => $inputs["jobManagerCommands"]
-            ));
-
-            //$rmId = $jsiObject->resourceJobManager->resourceJobManagerId;
-            //$rm = $airavataclient->updateResourceJobManager($rmId, $resourceManager);
-            //print_r( $rm); exit;
-            $localJobSubmission = new LOCALSubmission(array(
-                    "resourceJobManager" => $resourceManager
-                )
-            );
-
-            if ($update) //update Local JSP
-            {
-                $jsiObject = Airavata::getLocalJobSubmission(Session::get('authz-token'), $jsiId);
-                $localSub = Airavata::updateResourceJobManager(Session::get('authz-token'), $jsiObject->resourceJobManager->resourceJobManagerId, $resourceManager);
-                //$localSub = $airavataclient->updateLocalSubmissionDetails( $jsiId, $localJobSubmission);
-            } else // create Local JSP
-            {
-                $localSub = Airavata::addLocalSubmissionDetails(Session::get('authz-token'), $computeResource->computeResourceId, 0, $localJobSubmission);
-                return $localSub;
-            }
-
-        } else if ($inputs["jobSubmissionProtocol"] == JobSubmissionProtocol::SSH) {
-            $resourceManager = new ResourceJobManager(array(
-                "resourceJobManagerType" => $inputs["resourceJobManagerType"],
-                "pushMonitoringEndpoint" => $inputs["pushMonitoringEndpoint"],
-                "jobManagerBinPath" => $inputs["jobManagerBinPath"],
-                "jobManagerCommands" => $inputs["jobManagerCommands"]
-            ));
-            $sshJobSubmission = new SSHJobSubmission(array
-                (
-                    "securityProtocol" => intval($inputs["securityProtocol"]),
-                    "resourceJobManager" => $resourceManager,
-                    "alternativeSSHHostName" => $inputs["alternativeSSHHostName"],
-                    "sshPort" => intval($inputs["sshPort"]),
-                    "monitorMode" => MonitorMode::JOB_EMAIL_NOTIFICATION_MONITOR
-                )
-            );
-            //var_dump( $sshJobSubmission); exit;
-            if ($update) //update Local JSP
-            {
-                $jsiObject = Airavata::getSSHJobSubmission(Session::get('authz-token'), $jsiId);
-
-                //first update resource job manager
-                $rmjId = $jsiObject->resourceJobManager->resourceJobManagerId;
-                Airavata::updateResourceJobManager(Session::get('authz-token'), $rmjId, $resourceManager);
-                $jsiObject = Airavata::getSSHJobSubmission(Session::get('authz-token'), $jsiId);
-
-                $jsiObject->securityProtocol = intval($inputs["securityProtocol"]);
-                $jsiObject->alternativeSSHHostName = $inputs["alternativeSSHHostName"];
-                $jsiObject->sshPort = intval($inputs["sshPort"]);
-                $jsiObject->monitorMode = intval($inputs["monitorMode"]);
-                $jsiObject->resourceJobManager = Airavata::getresourceJobManager(Session::get('authz-token'), $rmjId);
-                //var_dump( $jsiObject); exit;
-                //add updated resource job manager to ssh job submission object.
-                //$sshJobSubmission->resourceJobManager->resourceJobManagerId = $rmjId;
-                $localSub = Airavata::updateSSHJobSubmissionDetails(Session::get('authz-token'), $jsiId, $jsiObject);
-            } else {
-                $sshSub = Airavata::addSSHJobSubmissionDetails(Session::get('authz-token'), $computeResource->computeResourceId, 0, $sshJobSubmission);
-            }
-            return;
-        } else if ($inputs["jobSubmissionProtocol"] == JobSubmissionProtocol::SSH_FORK) {
-            $resourceManager = new ResourceJobManager(array(
-                "resourceJobManagerType" => $inputs["resourceJobManagerType"],
-                "pushMonitoringEndpoint" => $inputs["pushMonitoringEndpoint"],
-                "jobManagerBinPath" => $inputs["jobManagerBinPath"],
-                "jobManagerCommands" => $inputs["jobManagerCommands"]
-            ));
-            $sshJobSubmission = new SSHJobSubmission(array
-                (
-                    "securityProtocol" => intval($inputs["securityProtocol"]),
-                    "resourceJobManager" => $resourceManager,
-                    "alternativeSSHHostName" => $inputs["alternativeSSHHostName"],
-                    "sshPort" => intval($inputs["sshPort"]),
-                    "monitorMode" => MonitorMode::FORK
-                )
-            );
-            //var_dump( $sshJobSubmission); exit;
-            if ($update) //update Local JSP
-            {
-                $jsiObject = Airavata::getSSHJobSubmission(Session::get('authz-token'), $jsiId);
-
-                //first update resource job manager
-                $rmjId = $jsiObject->resourceJobManager->resourceJobManagerId;
-                Airavata::updateResourceJobManager(Session::get('authz-token'), $rmjId, $resourceManager);
-                $jsiObject = Airavata::getSSHJobSubmission(Session::get('authz-token'), $jsiId);
-
-                $jsiObject->securityProtocol = intval($inputs["securityProtocol"]);
-                $jsiObject->alternativeSSHHostName = $inputs["alternativeSSHHostName"];
-                $jsiObject->sshPort = intval($inputs["sshPort"]);
-                $jsiObject->monitorMode = intval($inputs["monitorMode"]);
-                $jsiObject->resourceJobManager = Airavata::getresourceJobManager(Session::get('authz-token'), $rmjId);
-                //var_dump( $jsiObject); exit;
-                //add updated resource job manager to ssh job submission object.
-                //$sshJobSubmission->resourceJobManager->resourceJobManagerId = $rmjId;
-                $localSub = Airavata::updateSSHJobSubmissionDetails(Session::get('authz-token'), $jsiId, $jsiObject);
-            } else {
-                $sshSub = Airavata::addSSHForkJobSubmissionDetails(Session::get('authz-token'), $computeResource->computeResourceId, 0, $sshJobSubmission);
-            }
-            return;
-        } else if ($inputs["jobSubmissionProtocol"] == JobSubmissionProtocol::UNICORE) {
-            $unicoreJobSubmission = new UnicoreJobSubmission(array
-                (
-                    "securityProtocol" => intval($inputs["securityProtocol"]),
-                    "unicoreEndPointURL" => $inputs["unicoreEndPointURL"]
-                )
-            );
-            if ($update) {
-                $jsiObject = Airavata::getUnicoreJobSubmission(Session::get('authz-token'), $jsiId);
-                $jsiObject->securityProtocol = intval($inputs["securityProtocol"]);
-                $jsiObject->unicoreEndPointURL = $inputs["unicoreEndPointURL"];
-
-                $unicoreSub = Airavata::updateUnicoreJobSubmissionDetails(Session::get('authz-token'), $jsiId, $jsiObject);
-            } else {
-                $unicoreSub = Airavata::addUNICOREJobSubmissionDetails(Session::get('authz-token'), $computeResource->computeResourceId, 0, $unicoreJobSubmission);
-            }
-        } else {
-            print_r("Whoops! We haven't coded for this Job Submission Protocol yet. Still working on it. Please click <a href='" . URL::to('/') . "/cr/edit'>here</a> to go back to edit page for compute resource.");
-        }
-    }
-    */
-
     /*
      * Creating Data Movement Interface Object.
     */
     public static function create_or_update_DMIObject($inputs, $update = false)
     {
 
-        $computeResource = SRUtilities::get_compute_resource($inputs["srId"]);
-
-        if (Config::get('pga_config.airavata')['enable-app-catalog-cache']) {
-            if (Cache::has('SR-' . $inputs["srId"])) {
-                Cache::forget('SR-' . $inputs["srId"]);
-            }
-        }
+        $storageResource = SRUtilities::get_storage_resource($inputs["srId"]);
 
         if ($inputs["dataMovementProtocol"] == DataMovementProtocol::LOCAL) /* LOCAL */ {
             $localDataMovement = new LOCALDataMovement();
-            $localdmp = Airavata::addLocalDataMovementDetails(Session::get('authz-token'), $computeResource->computeResourceId, 0, $localDataMovement);
+            $localdmp = Airavata::addLocalDataMovementDetails(Session::get('authz-token'), $storageResource->storageResourceId, 0, $localDataMovement);
 
-            if ($localdmp)
-                print_r("The Local Data Movement has been added. Edit UI for the Local Data Movement Interface is yet to be made.
-                Please click <a href='" . URL::to('/') . "/cr/edit'>here</a> to go back to edit page for compute resource.");
         } else if ($inputs["dataMovementProtocol"] == DataMovementProtocol::SCP) /* SCP */ {
-            //var_dump( $inputs); exit;
             $scpDataMovement = new SCPDataMovement(array(
                     "securityProtocol" => intval($inputs["securityProtocol"]),
                     "alternativeSCPHostName" => $inputs["alternativeSSHHostName"],
                     "sshPort" => intval($inputs["sshPort"])
                 )
-
             );
 
             if ($update)
                 $scpdmp = Airavata::updateSCPDataMovementDetails(Session::get('authz-token'), $inputs["dmiId"], $scpDataMovement);
             else
-                $scpdmp = Airavata::addSCPDataMovementDetails(Session::get('authz-token'), $computeResource->computeResourceId, 0, $scpDataMovement);
+                $scpdmp = Airavata::addSCPDataMovementDetails(Session::get('authz-token'), $storageResource->storageResourceId, 0, $scpDataMovement);
         } else if ($inputs["dataMovementProtocol"] == DataMovementProtocol::GridFTP) /* GridFTP */ {
             $gridFTPDataMovement = new GridFTPDataMovement(array(
                 "securityProtocol" => $inputs["securityProtocol"],
@@ -265,7 +109,7 @@ class SRUtilities
             if ($update)
                 $gridftpdmp = Airavata::updateGridFTPDataMovementDetails(Session::get('authz-token'), $inputs["dmiId"], $gridFTPDataMovement);
             else
-                $gridftpdmp = Airavata::addGridFTPDataMovementDetails(Session::get('authz-token'), $computeResource->computeResourceId, 0, $gridFTPDataMovement);
+                $gridftpdmp = Airavata::addGridFTPDataMovementDetails(Session::get('authz-token'), $storageResource->storageResourceId, 0, $gridFTPDataMovement);
         } else if ($inputs["dataMovementProtocol"] == DataMovementProtocol::UNICORE_STORAGE_SERVICE) /* Unicore Storage Service */ {
             $unicoreDataMovement = new UnicoreDataMovement(array
                 (
@@ -276,7 +120,7 @@ class SRUtilities
             if ($update)
                 $unicoredmp = Airavata::updateUnicoreDataMovementDetails(Session::get('authz-token'), $inputs["dmiId"], $unicoreDataMovement);
             else
-                $unicoredmp = Airavata::addUnicoreDataMovementDetails(Session::get('authz-token'), $computeResource->computeResourceId, 0, $unicoreDataMovement);
+                $unicoredmp = Airavata::addUnicoreDataMovementDetails(Session::get('authz-token'), $storageResource->storageResourceId, 0, $unicoreDataMovement);
         } else /* other data movement protocols */ {
             print_r("Whoops! We haven't coded for this Data Movement Protocol yet. Still working on it. Please click <a href='" . URL::to('/') . "/cr/edit'>here</a> to go back to edit page for compute resource.");
         }
@@ -285,7 +129,6 @@ class SRUtilities
     public static function getAllSRObjects($onlyName = false)
     {
         $srNames = Airavata::getAllStorageResourceNames(Session::get('authz-token'));
-
         if ($onlyName)
             return $srNames;
         else {

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/a3a066fa/app/views/layout/fixed-scripts.blade.php
----------------------------------------------------------------------
diff --git a/app/views/layout/fixed-scripts.blade.php b/app/views/layout/fixed-scripts.blade.php
index 30c186e..de1da8f 100644
--- a/app/views/layout/fixed-scripts.blade.php
+++ b/app/views/layout/fixed-scripts.blade.php
@@ -44,6 +44,7 @@
 @endif
 <script type="text/javascript">
 
+$( document).ready( function(){
     var highest = null;
     $(".nav-tabs a").each(function () {  //find the height of your highest link
         var h = $(this).height();
@@ -73,4 +74,5 @@
             }
         });
     }
+});
 </script>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/a3a066fa/app/views/partials/dashboard-block.blade.php
----------------------------------------------------------------------
diff --git a/app/views/partials/dashboard-block.blade.php b/app/views/partials/dashboard-block.blade.php
index 6df9978..c0db0a2 100644
--- a/app/views/partials/dashboard-block.blade.php
+++ b/app/views/partials/dashboard-block.blade.php
@@ -47,13 +47,13 @@
             <ul>
                 @if(Session::has("admin"))
                 <li
-                @if( Session::has("admin-nav") && Session::get("admin-nav") == "cr-create") class="active" @endif>
+                @if( Session::has("admin-nav") && Session::get("admin-nav") == "sr-create") class="active" @endif>
                     <a class="dashboard-link" href="{{ URL::to('/')}}/sr/create"><i class="fa fa-fw fa-table"></i>Register</a>
                 </li>
                 @endif
                 @if(Session::has("admin") || Session::has("admin-read-only"))
                 <li
-                @if( Session::has("admin-nav") && Session::get("admin-nav") == "cr-browse") class="active" @endif>
+                @if( Session::has("admin-nav") && Session::get("admin-nav") == "sr-browse") class="active" @endif>
                     <a class="dashboard-link" href="{{ URL::to('/')}}/sr/browse"><i class="fa fa-fw fa-table"></i>Browse</a>
                 </li>
                 @endif

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/a3a066fa/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 5577a65..18ddd99 100644
--- a/app/views/partials/experiment-info.blade.php
+++ b/app/views/partials/experiment-info.blade.php
@@ -116,11 +116,11 @@
         </tr>
         <tr>
             <td><strong>Inputs</strong></td>
-            <td><?php ExperimentUtilities::list_input_files($experiment); ?></td>
+            <td><?php ExperimentUtilities::list_input_files($experiment->experimentInputs); ?></td>
         </tr>
         <tr>
             <td><strong>Outputs</strong></td>
-            <td><?php ExperimentUtilities::list_output_files($experiment, $expVal["experimentStatusString"]); ?></td>
+            <td><?php ExperimentUtilities::list_output_files($experiment->experimentOutputs, $expVal["experimentStatusString"], false); ?></td>
         </tr>
         @if( $expVal["experimentStatusString"] == "FAILED")
         <tr>
@@ -181,6 +181,137 @@
     @endif
 </div>
 
+@if( isset($dashboard))
+<h2 class="text-center">Detailed Experiment Information</h2>
+<div class="tree">
+    <ul>
+        <li>
+            <span><i class="icon-calendar"></i>{{ $detailedExperiment->experimentName }}</span>
+            <ul>
+                @foreach( $detailedExperiment->processes as $index => $process)
+                <li>
+                    <span class="badge badge-success"><i class="icon-minus-sign"></i>Process - {{ $process->processId }}</span>
+                    <ul>
+                        <li>
+                            <span class="alert"><i class="icon-time"></i>
+                                <p>Inputs<br/>
+                                {{ ExperimentUtilities::list_input_files( $process->processInputs) }}</p>
+                            </span>
+                        </li>
+                        <li>
+                            <span class="alert"><i class="icon-time"></i>
+                                Tasks
+                            </span>
+
+                                @foreach( $process->tasks as $task)
+                                    <br/>Task Id : {{ $task->taskId}}
+                                    <br/>Task Type : {{ $task->taskType }}
+                                    <br/>Task Status : {{ $task->taskStatus->state}}
+                                    <br/>Jobs : {{ count( $task->jobs)}}
+                                    <br/>@foreach( $task->jobs as $jobIndex => $job)
+                                            Job No. : {{ $jobIndex}}
+                                         @endforeach
+
+                                    <hr/>
+                                @endforeach
+                        </li>
+                        <li>
+                            <span class="alert"><i class="icon-time"></i>
+                                <p>Outputs<hr/>
+                                {{ ExperimentUtilities::list_output_files( $process->processOutputs, $process->processStatus->state, true) }}</p>
+                            </span>
+                        </li>
+                    </ul>
+                </li>
+                @endforeach
+                <li>
+                    <span class="alert"><i class="icon-time"></i>
+                        Errors<br/>
+                        @foreach( $detailedExperiment->errors as $error)
+                            Error Id : {{ $error->errorId}}<br/>
+                            Error Message : {{ $error->actualErrorMessage}}
+                        @endforeach
+                    </span>
+                </li>
+            </ul>
+        </li>
+                <!--
+                <li>
+                    <span class="badge badge-success"><i class="icon-minus-sign"></i>Input Staging</span>
+                    <ul>
+                        <li>
+                            <span class="alert alert-success"><i
+                                    class="icon-time"></i>2015-04-17 15:21:21</span> &ndash; <a href="">PGA to
+
+                                Airavata File Transfer Successful</a>
+                        </li>
+                        <li>
+                            <span class="alert alert-success" abhi><i
+                                    class="icon-time"></i>2015-04-17 15:21:21</span> &ndash; <a href="">Airavata to
+
+                                Resource File Transfer Successful</a>
+                        </li>
+                    </ul>
+                </li>
+                <li>
+                    <span class="badge badge-warning"><i class="icon-minus-sign"></i>Job Description</span>
+                    <ul>
+                        <li>
+                            <a href=""><span>
+                                               Long Script of Job Description / PBS Script <br/>
+                                               <br/>
+                                                <p>
+                                                    Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean
+                                                    commodo ligula eget dolor. Aenean massa. Cum sociis natoque
+                                                    penatibus et magnis dis parturient montes, nascetur ridiculus
+                                                    mus. Donec quam felis, ultricies nec, pellentesque eu, pretium
+                                                    quis, sem. Nulla consequat massa quis enim. Donec pede justo,
+                                                    fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo,
+                                                    rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum
+                                                    felis eu pede mollis pretium. Integer tincidunt. Cras dapibus.
+                                                    Vivamus elementum semper nisi. Aenean vulputate eleifend tellus.
+                                                    Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac,
+                                                    enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a,
+                                                    tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque
+                                                    rutrum. Aenean
+                                                </p>
+                                             </span></a>
+                        </li>
+                    </ul>
+                </li>
+                <li>
+                    <span class="badge badge-important"><i class="icon-minus-sign"></i>Execution</span>
+                    <ul>
+                        <li>
+                            <a href=""><span class="alert alert-success"><i class="icon-time"></i>2015-04-17 15:21:21</span> &ndash;
+                                Execution of Job Description - No errors</a>
+                        </li>
+                    </ul>
+                </li>
+
+                <li>
+                    <span class="badge badge-important"><i class="icon-minus-sign"></i>Experiment Complete</span>
+                    <ul>
+                        <li>
+                            <a href=""><span class="alert alert-danger"><i class="icon-time"></i>2015-04-17 15:21:21</span> &ndash;
+                                Output Transfer from Resource to Airavata UnSuccessful</a>
+                            <br/>
+                            <span> Some text about failure</span>
+                        </li>
+                        <li>
+                            <a href=""><span class="alert alert-danger"><i class="icon-time"></i>2015-04-17 15:21:21</span> &ndash;
+                                Output Transfer from Airavata to PGA UnSuccessful</a>
+                            <br/>
+                            <span> Some text about failure</span>
+                        </li>
+                    </ul>
+                </li>
+                -->
+
+    </ul>
+</div>
+@endif
+
 @section('scripts')
 @parent
 {{ HTML::script('js/time-conversion.js')}}

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/a3a066fa/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 a09bef2..1494bc3 100644
--- a/app/views/partials/experiment-inputs.blade.php
+++ b/app/views/partials/experiment-inputs.blade.php
@@ -39,7 +39,7 @@
             @if( isset( $expInputs['cloning']))
             <div class="form-group">
                 <p><strong>Current inputs</strong></p>
-                {{ ExperimentUtilities::list_input_files($expInputs['experiment']) }}
+                {{ ExperimentUtilities::list_input_files($expInputs['experiment']->experimentInputs) }}
             </div>
             {{ ExperimentUtilities::create_inputs($expInputs['application'], false) }}
             @else

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/a3a066fa/app/views/resource/edit.blade.php
----------------------------------------------------------------------
diff --git a/app/views/resource/edit.blade.php b/app/views/resource/edit.blade.php
index c5a2671..b52af67 100644
--- a/app/views/resource/edit.blade.php
+++ b/app/views/resource/edit.blade.php
@@ -18,9 +18,10 @@
 
 <input type="hidden" class="base-url" value="{{URL::to('/')}}"/>
 
-<div class="well">
-    <h4>Compute Resource : {{ $computeResource->hostName }}</h4>
-</div>
+<ol class="breadcrumb">
+    <li><a href="{{URL::to('/')}}/cr/browse">Compute Resources</a></li>
+    <li class="active">{{ $computeResource->hostName }}</li>
+</ol>
 @if( Session::has("message"))
 <span class="alert alert-success col-md-12">{{Session::get("message")}}</span>
 {{Session::forget("message") }}
@@ -414,7 +415,8 @@
                         @endforeach
                     </select>
                 </div>
-{{--                <div class="form-group">
+<!--
+                <div class="form-group">
                     <label class="control-label">Select Monitoring Mode</label>
                     <select name="monitorMode">
                         @foreach( $monitorModes as $index => $mode)
@@ -422,7 +424,8 @@
                         @if( $JSI->monitorMode == $index ) selected @endif>{{ $mode}}</option>
                         @endforeach
                     </select>
-                </div>--}}
+                </div>
+-->
                 <div class="form-group">
                     <label class="control-label">Alternate SSH Host Name</label>
                     <input class='form-control' name='alternativeSSHHostName'
@@ -445,7 +448,8 @@
                         @endforeach
                     </select>
                 </div>
-{{--                <div class="form-group">
+<!--
+                <div class="form-group">
                     <label class="control-label">Select Monitoring Mode</label>
                     <select name="monitorMode">
                         @foreach( $monitorModes as $index => $mode)
@@ -453,7 +457,8 @@
                         @if( $JSI->monitorMode == $index ) selected @endif>{{ $mode}}</option>
                         @endforeach
                     </select>
-                </div>--}}
+                </div>
+-->
 
                 <div>
                     <div class="form-group required">
@@ -480,7 +485,8 @@
                         @endforeach
                     </select>
                 </div>
-{{--                <div class="form-group">
+<!--
+                <div class="form-group">
                     <label class="control-label">Select Monitoring Mode</label>
                     <select name="monitorMode">
                         @foreach( $monitorModes as $index => $mode)
@@ -488,7 +494,8 @@
                         @if( $JSI->monitorMode == $index ) selected @endif>{{ $mode}}</option>
                         @endforeach
                     </select>
-                </div>--}}
+                </div>
+-->
 
                 <div>
                     <div class="form-group required">

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/a3a066fa/app/views/storage-resource/browse.blade.php
----------------------------------------------------------------------
diff --git a/app/views/storage-resource/browse.blade.php b/app/views/storage-resource/browse.blade.php
index 775b51f..a15307d 100644
--- a/app/views/storage-resource/browse.blade.php
+++ b/app/views/storage-resource/browse.blade.php
@@ -47,9 +47,7 @@
 
                         <tr>
                             <th>Id</th>
-                            <th>Login Username</th>
-                            <th>File System Root Location</th>
-                            <th>Resource Specific Credential Store Token</th>
+                            <th>Hostname</th>
                             @if(Session::has("admin"))
                             <th>Edit</th>
                             @endif
@@ -59,18 +57,14 @@
                             @endif
                         </tr>
 
-                        @foreach($allSRRs as $resource)
+                        @foreach($allSRs as $resource)
                         <?php
-                            $srId = $resource->dataMovememtResourceId;
-                            $userName = $resource->loginUserName;
-                            $fileSystemRootLocation = $resource->fileSystemRootLocation;
-                            $resourceSpecificCredentialStoreToken = $resource->resourceSpecificCredentialStoreToken;
+                            $srId = $resource->storageResourceId;
+                            $hostName = $resource->hostName;
                         ?>
                         <tr id="srDetails">
                             <td>{{ $srId }}</td>
-                            <td>{{ $userName }}</td>
-                            <td>{{ $fileSystemRootLocation }}</td>
-                            <td>{{ resourceSpecificCredentialStoreToken }}</td>
+                            <td>{{ $hostName }}</td>
                             @if(Session::has("admin"))
                             <td><a href="{{URL::to('/')}}/sr/edit?srId={{ $srId }}" title="Edit">
                                     <span class="glyphicon glyphicon-pencil"></span>


Mime
View raw message