You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by nd...@apache.org on 2016/01/29 17:53:23 UTC

[1/4] airavata-php-gateway git commit: Experiment Summary UI improved for Job details.

Repository: airavata-php-gateway
Updated Branches:
  refs/heads/develop 6b20ef969 -> 39df35a89


Experiment Summary UI improved for Job details.


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

Branch: refs/heads/develop
Commit: ec279ca5b51578aff66e34d47a3174903455867f
Parents: 6b20ef9
Author: Nipurn Doshi <ni...@gmail.com>
Authored: Fri Jan 29 10:40:18 2016 -0500
Committer: Nipurn Doshi <ni...@gmail.com>
Committed: Fri Jan 29 10:40:18 2016 -0500

----------------------------------------------------------------------
 app/views/partials/experiment-info.blade.php | 21 +++++++++++++++++----
 1 file changed, 17 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/ec279ca5/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 1d53c17..7ff3f27 100644
--- a/app/views/partials/experiment-info.blade.php
+++ b/app/views/partials/experiment-info.blade.php
@@ -62,10 +62,23 @@
 
         @foreach( $expVal["jobDetails"] as $index => $jobDetail)
             <tr>
-                <th>Job Name : {{$jobDetail->jobName}}</th>
-                <td>Job ID : {{ $jobDetail->jobId}}</td>
-                <td> Status : {{$jobDetail->jobStatus->jobStateName }}</td>
-                <td> Creation Time : <span class="time" unix-time="{{$jobDetail->creationTime}}"></span></td>
+                <th>Job</th>
+                <td>
+                    <table class="table table-bordered">
+                        <tr>
+                            <td>Name</td>
+                            <td>ID</td>
+                            <td>Status</td>
+                            <td>Creation Time</td>
+                        </tr>
+                        <tr>
+                            <td>{{$jobDetail->jobName}}</td>
+                            <td>{{ $jobDetail->jobId}}</td>
+                            <td>{{$jobDetail->jobStatus->jobStateName }}</td>
+                            <td class="time" unix-time="{{$jobDetail->creationTime}}"></td>
+                        </tr>
+                    </table>
+                </td>
             </tr>
         @endforeach
         <!--


[3/4] airavata-php-gateway git commit: Removing unused redundant file.

Posted by nd...@apache.org.
Removing unused redundant file.


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

Branch: refs/heads/develop
Commit: ea5afa33a5efd667d4a05081aab64494dcb56e35
Parents: 28dec13
Author: Nipurn Doshi <ni...@gmail.com>
Authored: Fri Jan 29 10:44:29 2016 -0500
Committer: Nipurn Doshi <ni...@gmail.com>
Committed: Fri Jan 29 10:44:29 2016 -0500

----------------------------------------------------------------------
 app/controllers/ResourceController.php | 211 ----------------------------
 1 file changed, 211 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/ea5afa33/app/controllers/ResourceController.php
----------------------------------------------------------------------
diff --git a/app/controllers/ResourceController.php b/app/controllers/ResourceController.php
deleted file mode 100755
index 91530a2..0000000
--- a/app/controllers/ResourceController.php
+++ /dev/null
@@ -1,211 +0,0 @@
-<?php
-
-class ResourceController extends BaseController
-{
-
-    /**
-     *    Instantiate a new Compute Resource Controller Instance
-     **/
-
-    public function __construct()
-    {
-        $this->beforeFilter('verifyadmin');
-        Session::put("nav-active", "compute-resource");
-
-    }
-
-    public function createView()
-    {
-        return View::make("resource/create");
-    }
-
-    public function createSubmit()
-    {
-
-        $hostAliases = Input::get("hostaliases");
-        $ips = Input::get("ips");
-        $computeDescription = array(
-            "hostName" => trim(Input::get("hostname")),
-            "hostAliases" => array_unique(array_filter($hostAliases)),
-            "ipAddresses" => array_unique(array_filter($ips)),
-            "resourceDescription" => Input::get("description")
-        );
-        $computeResource = CRUtilities::register_or_update_compute_resource($computeDescription);
-
-        return Redirect::to("cr/edit?crId=" . $computeResource->computeResourceId);
-    }
-
-    public function editView()
-    {
-
-        $data = CRUtilities::getEditCRData();
-        $computeResourceId = "";
-        if (Input::has("crId"))
-            $computeResourceId = Input::get("crId");
-        else if (Session::has("computeResource")) {
-            $computeResource = Session::get("computeResource");
-            $computeResourceId = $computeResource->computeResourceId;
-        }
-
-        if ($computeResourceId != "") {
-            $computeResource = CRUtilities::get_compute_resource($computeResourceId);
-            $jobSubmissionInterfaces = array();
-            $dataMovementInterfaces = array();
-            $addedJSP = array();
-            $addedDMI = array();
-            //var_dump( $computeResource->jobSubmissionInterfaces); exit;
-            if (count($computeResource->jobSubmissionInterfaces)) {
-                foreach ($computeResource->jobSubmissionInterfaces as $JSI) {
-                    $jobSubmissionInterfaces[] = CRUtilities::getJobSubmissionDetails($JSI->jobSubmissionInterfaceId, $JSI->jobSubmissionProtocol);
-                    $addedJSP[] = $JSI->jobSubmissionProtocol;
-                }
-            }
-            //var_dump( CRUtilities::getJobSubmissionDetails( $data["computeResource"]->jobSubmissionInterfaces[0]->jobSubmissionInterfaceId, 1) ); exit;
-            if (count($computeResource->dataMovementInterfaces)) {
-                foreach ($computeResource->dataMovementInterfaces as $DMI) {
-                    $dataMovementInterfaces[] = CRUtilities::getDataMovementDetails($DMI->dataMovementInterfaceId, $DMI->dataMovementProtocol);
-                    $addedDMI[] = $DMI->dataMovementProtocol;
-                }
-            }
-
-            $data["computeResource"] = $computeResource;
-            $data["jobSubmissionInterfaces"] = $jobSubmissionInterfaces;
-            $data["dataMovementInterfaces"] = $dataMovementInterfaces;
-            $data["addedJSP"] = $addedJSP;
-            $data["addedDMI"] = $addedDMI;
-            //var_dump($data["jobSubmissionInterfaces"]); exit;
-            return View::make("resource/edit", $data);
-        } else
-            return View::make("resource/browse")->with("login-alert", "Unable to retrieve this Compute Resource. Please report this error to devs.");
-
-    }
-
-    public function editSubmit()
-    {
-
-        $tabName = "";
-        if (Input::get("cr-edit") == "resDesc") /* Modify compute Resource description */ {
-            $computeDescription = CRUtilities::get_compute_resource(Input::get("crId"));
-            $computeDescription->hostName = trim(Input::get("hostname"));
-            $computeDescription->hostAliases = array_unique(array_filter(Input::get("hostaliases")));
-            $computeDescription->ipAddresses = array_unique(array_filter(Input::get("ips")));
-            $computeDescription->resourceDescription = Input::get("description");
-            $computeDescription->maxMemoryPerNode = Input::get("maxMemoryPerNode");
-            //var_dump( $computeDescription); exit;
-
-            $computeResource = CRUtilities::register_or_update_compute_resource($computeDescription, true);
-
-            $tabName = "#tab-desc";
-        }
-        if (Input::get("cr-edit") == "queue") /* Add / Modify a 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")
-            );
-
-            $computeDescription = CRUtilities::get_compute_resource(Input::get("crId"));
-            $computeDescription->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") /* Add / Modify a Job Submission Interface */ {
-            $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 */ {
-            $update = false;
-            if (Input::get("cr-edit") == "edit-dmi")
-                $update = true;
-            $dataMovementInterface = CRUtilities::create_or_update_DMIObject(Input::all(), $update);
-
-            $tabName = "#tab-dataMovement";
-        } else if (Input::get("cr-edit") == "dmi-priority") {
-            $inputs = Input::all();
-            $computeDescription = CRUtilities::get_compute_resource(Input::get("crId"));
-            foreach ($computeDescription->dataMovementInterfaces as $index => $dmi) {
-                foreach ($inputs["dmi-id"] as $idIndex => $dmiId) {
-                    if ($dmiId == $dmi->dataMovementInterfaceId) {
-                        $computeDescription->dataMovementInterfaces[$index]->priorityOrder = $inputs["dmi-priority"][$idIndex];
-                        break;
-                    }
-                }
-            }
-            $computeResource = CRUtilities::register_or_update_compute_resource($computeDescription, true);
-
-            return 1; //currently done by ajax.
-        }
-
-        return Redirect::to("cr/edit?crId=" . Input::get("crId") . $tabName);
-    }
-
-    public function deleteActions()
-    {
-
-        $result = CRUtilities::deleteActions(Input::all());
-        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("cr/edit?crId=" . Input::get("crId") . "#tab-dataMovement")
-                ->with("message", "Data Movement Protocol was deleted successfully");
-        } elseif (Input::has("del-crId")) {
-            return Redirect::to("cr/browse")->with("message", "The Compute Resource has been successfully deleted.");
-        } else
-            return $result;
-    }
-
-    public function browseView()
-    {
-        $data = CRUtilities::getBrowseCRData(true);
-        $allCRs = $data["crObjects"];
-        $appDeployments = $data["appDeployments"];
-
-        $connectedDeployments = array();
-        foreach ((array)$allCRs as $crId => $crName) {
-            $connectedDeployments[$crId] = 0;
-            foreach ((array)$appDeployments as $deploymentObject) {
-                if ($crId == $deploymentObject->computeHostId)
-                    $connectedDeployments[$crId]++;
-            }
-        }
-        return View::make("resource/browse", array(
-            "allCRs" => $allCRs,
-            "connectedDeployments" => $connectedDeployments
-        ));
-
-    }
-}
-
-?>
\ No newline at end of file


[2/4] airavata-php-gateway git commit: Bug Fix - Correcting Link to Browse Experiments page

Posted by nd...@apache.org.
Bug Fix - Correcting Link to Browse Experiments page


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

Branch: refs/heads/develop
Commit: 28dec138183a678958d93efce8918cd166e4a9d1
Parents: ec279ca
Author: Nipurn Doshi <ni...@gmail.com>
Authored: Fri Jan 29 10:41:49 2016 -0500
Committer: Nipurn Doshi <ni...@gmail.com>
Committed: Fri Jan 29 10:41:49 2016 -0500

----------------------------------------------------------------------
 app/views/account/dashboard.blade.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/28dec138/app/views/account/dashboard.blade.php
----------------------------------------------------------------------
diff --git a/app/views/account/dashboard.blade.php b/app/views/account/dashboard.blade.php
index 6bbf1bb..66d7432 100644
--- a/app/views/account/dashboard.blade.php
+++ b/app/views/account/dashboard.blade.php
@@ -40,7 +40,7 @@
                     </div>
                 </a>
 
-                <a href="{{URL::to('/')}}/admin/dashboard/experiments">
+                <a href="{{URL::to('/')}}/experiments/browse">
                     <div class="@if( Session::has('admin')) col-md-4 @else col-md-6 @endif well">
                         <div class="col-md-12">
                             <span class="glyphicon glyphicon-tasks console-icon"></span>


[4/4] airavata-php-gateway git commit: 1) Removed ability for super admin to edit other gateway's preferences. 2) Added UI for super admin to view their own gateway separately.

Posted by nd...@apache.org.
1) Removed ability for super admin to edit other gateway's preferences.
2) Added UI for super admin to view their own gateway separately.


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

Branch: refs/heads/develop
Commit: 39df35a893e8310089ea13f2f0d760ef27be1ad6
Parents: ea5afa3
Author: Nipurn Doshi <ni...@gmail.com>
Authored: Fri Jan 29 11:52:49 2016 -0500
Committer: Nipurn Doshi <ni...@gmail.com>
Committed: Fri Jan 29 11:52:49 2016 -0500

----------------------------------------------------------------------
 app/views/admin/manage-gateway.blade.php | 281 ++++----------------------
 1 file changed, 36 insertions(+), 245 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/39df35a8/app/views/admin/manage-gateway.blade.php
----------------------------------------------------------------------
diff --git a/app/views/admin/manage-gateway.blade.php b/app/views/admin/manage-gateway.blade.php
index 6c47742..7e99d3f 100644
--- a/app/views/admin/manage-gateway.blade.php
+++ b/app/views/admin/manage-gateway.blade.php
@@ -24,11 +24,19 @@
             @endif
         </div>
         <div class="container-fluid">
+            <div class="panel-group" id="accordion2">
+                <h3>Your Gateway Preferences</h3>
+                @foreach( $gateways as $indexGP => $gp )
+                    @if( $gp->gatewayId == Session::get("gateway_id"))
+                        @include('partials/gateway-preferences-block', array("gp" => $gp, "accName" => "accordion2") )
+                    @endif
+                @endforeach
+            </div>
 
+            @if( Session::has('super-admin'))
             <div class="row">
-
                 <div class="col-md-6">
-                    <h3>Gateway Preferences</h3>
+                    <h3>Other Gateway Preferences</h3>
                 </div>
                 @if( Session::has("super-admin"))
                 <div class="col-md-6" style="margin-top:2%">
@@ -83,251 +91,18 @@
                 </form>
                  @endif
             </div>
-            <div class="panel-group" id="accordion2">
-                @foreach( $gateways as $indexGP => $gp )
-                <div class="panel panel-default">
-                    <div class="panel-heading">
-                        <h4 class="panel-title">
-                            <a class="accordion-toggle collapsed gateway-name" data-toggle="collapse"
-                               data-parent="#accordion2" href="#collapse-gateway-{{$indexGP}}">
-                                {{ $gp->gatewayName }}
-                            </a>
-                            @if(Session::has("admin"))
-                            <!-- Backend needs to be added for this
-                            
-                            <div class="pull-right col-md-2 gateway-options fade">
-                                <span class="glyphicon glyphicon-pencil edit-gateway" style="cursor:pointer;"
-                                      data-toggle="modal" data-target="#edit-gateway-block"
-                                      data-gp-id="{{ $gp->gatewayId }}" data-gp-name="{{ $gp->gatewayName }}"></span>
-                            </div>
-                            -->
-                            @endif
-                        </h4>
-                    </div>
-                    <div id="collapse-gateway-{{$indexGP}}" class="panel-collapse collapse">
-                        <div class="panel-body">
-                            <div class="app-interface-block">
-                                <div class="row">
-                                     @if(Session::has("admin"))
-                                    <div class="col-md-10 credential-store-token-change">
-                                        <form>
-                                            <div class="form-group">
-                                                <label class="control-label col-md-12">{{ Session::get('theme') }} Credential Store Token</label>
-                                                <div class="col-md-9">
-                                                    <select class="form-control gateway-credential-store-token" name="resourceSpecificCredentialStoreToken"  data-gpid="{{$gp->gatewayId}}" >
-                                                        @if( isset( $gp->profile->credentialStoreToken) )
-                                                        <option value="{{$gp->profile->credentialStoreToken}}">{{$gp->profile->credentialStoreToken}}</option>
-                                                        @else
-                                                        <option value="">Select a Credential Token from Store</option>
-                                                        @endif
-                                                        <option value="">DO-NO-SET</option>
-                                                        @foreach( $tokens as $token => $publicKey)
-                                                        <option value="{{$token}}">{{$token}}</option>
-                                                        @endforeach
-                                                    </select>
-                                                    <!--
-                                                    <input type="text" name="resourceSpecificCredentialStoreToken"  data-gpid="{{$gp->gatewayId}}" class="form-control credential-store-token"
-                                                           value="@if( isset( $gp->profile->credentialStoreToken) ){{$gp->profile->credentialStoreToken}}@endif"/>
-                                                    -->
-                                                </div>
-                                                <div class="col-md-3">
-                                                        <input type="submit" class="form-control btn btn-primary" value="Set"/>
-                                                </div>
-                                            </div>
-                                        </form>
-                                    </div>
-                                    <div class="col-md-10">
-                                        <button class="btn btn-default add-cr" data-gpid="{{$gp->gatewayId}}"><span
-                                                class="glyphicon glyphicon-plus"></span> Add a Compute Resource Preference
-                                        </button>
-                                    </div>
-                                    @endif
-                                </div>
-                                    
-                                    <div class="col-md-10">
-                                        @if( isset( $gp->profile->computeResourcePreferences) )
-                                        <div>
-                                            <h3>Compute Resource Preferences :</h3>
-                                        </div>
-                                        <div class="accordion-inner">
-                                            <div class="panel-group" id="accordion-{{$indexGP}}">
-                                                @foreach( (array)$gp->profile->computeResourcePreferences as $indexCRP
-                                                => $crp )
-                                                <div class="panel panel-default">
-                                                    <div class="panel-heading">
-                                                        <h4 class="panel-title">
-                                                            <a class="accordion-toggle collapsed gateway-name"
-                                                               data-toggle="collapse" data-parent="#accordion"
-                                                               href="#collapse-crp-{{$indexGP}}-{{$indexCRP}}">
-                                                                {{ $crp->crDetails->hostName }}
-                                                            </a>
-                                                            @if(Session::has("admin"))
-                                                            <div class="pull-right col-md-2 gateway-options fade">
-                                                                <span class="glyphicon glyphicon-remove remove-compute-resource"
-                                                                      style="cursor:pointer;" data-toggle="modal"
-                                                                      data-target="#remove-compute-resource-block"
-                                                                      data-cr-name="{{$crp->crDetails->hostName}}"
-                                                                      data-cr-id="{{$crp->computeResourceId}}"
-                                                                      data-gp-id="{{ $gp->gatewayId }}"></span>
-                                                            </div>
-                                                            @endif
-                                                        </h4>
-                                                    </div>
-                                                    <div id="collapse-crp-{{$indexGP}}-{{$indexCRP}}"
-                                                         class="panel-collapse collapse">
-                                                        <div class="panel-body">
-                                                            <div class="app-compute-resource-preferences-block">
-                                                                <form action="{{URL::to('/')}}/gp/update-crp"
-                                                                      method="POST">
-                                                                    <input type="hidden" name="gatewayId" id="gatewayId"
-                                                                           value="{{$gp->gatewayId}}">
-                                                                    <input type="hidden" name="computeResourceId"
-                                                                           id="gatewayId"
-                                                                           value="{{$crp->computeResourceId}}">
-
-                                                                    <div class="form-horizontal">
-                                                                        @include('partials/compute-resource-preferences',
-                                                                        array('computeResource' => $crp->crDetails,
-                                                                        'crData' => $crData, 'preferences'=>$crp,
-                                                                        'show'=>true))
-                                                                    </div>
-                                                                </form>
-                                                            </div>
-                                                        </div>
-                                                    </div>
-                                                </div>
-                                                @endforeach
-                                            </div>
-                                        </div>
-                                        @endif
-                                        @if( isset( $gp->profile->storagePreferences) )
-                                        <div>
-                                            <h3>Storage Resource Preferences :</h3>
-                                        </div>
-                                        <div class="accordion-inner">
-                                            <div class="panel-group" id="accordion-{{$indexGP}}">
-                                                @foreach( (array)$gp->profile->storagePreferences as $indexSRP
-                                                => $srp )
-                                                <div class="panel panel-default">
-                                                    <div class="panel-heading">
-                                                        <h4 class="panel-title">
-                                                            <a class="accordion-toggle collapsed gateway-name"
-                                                               data-toggle="collapse" data-parent="#accordion"
-                                                               href="#collapse-srp-{{$indexGP}}-{{$indexSRP}}">
-                                                                {{ $srp->srDetails->hostName }}
-                                                            </a>
-                                                            @if(Session::has("admin"))
-                                                            <div class="pull-right col-md-2 gateway-options fade">
-                                                                <span class="glyphicon glyphicon-remove remove-storage-resource"
-                                                                      style="cursor:pointer;" data-toggle="modal"
-                                                                      data-target="#remove-storage-resource-block"
-                                                                      data-sr-name="{{$srp->srDetails->hostName}}"
-                                                                      data-sr-id="{{$srp->storageResourceId}}"
-                                                                      data-gp-id="{{ $gp->gatewayId }}"></span>
-                                                            </div>
-                                                            @endif
-                                                        </h4>
-                                                    </div>
-                                                    <div id="collapse-srp-{{$indexGP}}-{{$indexSRP}}"
-                                                         class="panel-collapse collapse">
-                                                        <div class="panel-body">
-                                                            <div class="app-compute-resource-preferences-block">
-                                                                <form action="{{URL::to('/')}}/gp/update-srp"
-                                                                      method="POST">
-                                                                    <input type="hidden" name="gatewayId" id="gatewayId"
-                                                                           value="{{$gp->gatewayId}}">
-                                                                    <input type="hidden" name="storageResourceId"
-                                                                           id="gatewayId"
-                                                                           value="{{$srp->storageResourceId}}">
-
-                                                                    <div class="form-horizontal">
-                                                                        @include('partials/storage-resource-preferences',
-                                                                        array('storageResource' => $srp->srDetails,
-                                                                        'srData' => $srData, 'preferences'=>$srp,
-                                                                        'show'=>true))
-                                                                    </div>
-                                                                </form>
-                                                            </div>
-                                                        </div>
-                                                    </div>
-                                                </div>
-                                                @endforeach
-                                            </div>
-                                        </div>
-                                        @endif
-                                    </div>
-
-                                    <div class="col-md-10">
-                                        <button class="btn btn-default add-dsp" data-gpid="{{$gp->gatewayId}}"><span
-                                                class="glyphicon glyphicon-plus"></span> Add a Data Storage Preference
-                                        </button>
-                                    </div>
-
-                                    <div class="col-md-10">
-                                        @if( isset( $gp->profile->dataStoragePreferences) )
-                                        <div>
-                                            <h3>Data Storage Preferences :</h3>
-                                        </div>
-
-                                        <div class="accordion-inner">
-                                            <div class="panel-group" id="accordion-{{$indexGP}}">
-                                                @foreach( (array)$gp->profile->dataStoragePreferences as $indexDSP
-                                                => $dsp )
-                                                <div class="panel panel-default">
-                                                    <div class="panel-heading">
-                                                        <h4 class="panel-title">
-                                                            <a class="accordion-toggle collapsed gateway-name"
-                                                               data-toggle="collapse" data-parent="#accordion"
-                                                               href="#collapse-dsp-{{$indexGP}}-{{$indexDSP}}">
-                                                                {{ $dsp->dataMovememtResourceId }}
-                                                            </a>
-                                                            @if(Session::has("admin"))
-                                                            <div class="pull-right col-md-2 gateway-options fade">
-                                                                <span class="glyphicon glyphicon-remove remove-storage-resource"
-                                                                      style="cursor:pointer;" data-toggle="modal"
-                                                                      data-target="#remove-storage-resource-block"
-                                                                      data-dsp-id="{{$ds->computeResourceId}}"
-                                                                      data-gp-id="{{ $gp->gatewayId }}"></span>
-                                                            </div>
-                                                            @endif
-                                                        </h4>
-                                                    </div>
-                                                    <div id="collapse-dsp-{{$indexGP}}-{{$indexDSP}}"
-                                                         class="panel-collapse collapse">
-                                                        <div class="panel-body">
-                                                            <div class="app-data-storage-preferences-block">
-                                                                <form action="{{URL::to('/')}}/gp/update-dsp"
-                                                                      method="POST">
-                                                                    <input type="hidden" name="gatewayId" id="gatewayId"
-                                                                           value="{{$gp->gatewayId}}">
-                                                                    <input type="hidden" name="dataStorageId"
-                                                                           id="gatewayId"
-                                                                           value="{{$crp->dataMovememtResourceId}}">
-
-                                                                    <div class="form-horizontal">
-                                                                        @include('partials/compute-resource-preferences',
-                                                                        array('computeResource' => $crp->crDetails,
-                                                                        'crData' => $crData, 'preferences'=>$crp,
-                                                                        'show'=>true))
-                                                                    </div>
-                                                                </form>
-                                                            </div>
-                                                        </div>
-                                                    </div>
-                                                </div>
-                                                @endforeach
-                                            </div>
-                                        </div>
-                                        @endif
-
-                                    </div>
-                                </div>
-                            </div>
-                        </div>
+
+            <div class="panel-group" id="accordion1">
+                    @foreach( $gateways as $indexGP => $gp )
+                    <div class='super-admin-gateways-view'>
+                        @include('partials/gateway-preferences-block', array("gp" => $gp, "accName" => "accordion1"))
                     </div>
-                @endforeach
+                    @endforeach
                 </div>
             </div>
+
+            @endif
+
         </div>
         <!-- /.container-fluid -->
 
@@ -468,7 +243,7 @@
 <script>
     //make first tab of accordion open by default.
     //temporary fix
-    $("#accordion2 #collapse-gateway-0").addClass("in");
+    $("#accordion2 #accordion2-collapse-gateway-0").addClass("in");
 
     $(".credential-store-token-change > form").submit( function(e){
         $(this).prepend( "<img id='loading-gif' src='{{URL::to('/')}}/assets/ajax-loader.gif'/>");
@@ -524,5 +299,21 @@
         });
     });
 
+    disableInputs( $(".super-admin-gateways-view"));
+
+    function disableInputs( elem){
+      elem.find("input").each( function( i,e){
+          if( $(e).attr("type")=='submit' || $(e).attr("type")=='button'  )
+              $(e).attr("disabled", "true");
+           else
+              $(e).prop("readonly", "true");
+      });
+      elem.find("textarea").prop("readonly", "true");
+      elem.find("select").attr("disabled", "true");
+      elem.find(".hide").prop("readonly", "true");
+      elem.find("button").attr("disabled", "true");
+      $(".glyphicon").hide();
+    }
+
 </script>
 @stop
\ No newline at end of file