airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ndo...@apache.org
Subject airavata-php-gateway git commit: Proposed UI for maintaining Resources on admin dashboard added.
Date Thu, 14 May 2015 21:16:22 GMT
Repository: airavata-php-gateway
Updated Branches:
  refs/heads/master 7d786c835 -> ba097dbc9


Proposed UI for maintaining Resources on admin dashboard added.


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

Branch: refs/heads/master
Commit: ba097dbc98b4ab3e25a89d1b107d5bc5c63bd4d9
Parents: 7d786c8
Author: Nipurn Doshi <nipunhere@gmail.com>
Authored: Thu May 14 17:16:10 2015 -0400
Committer: Nipurn Doshi <nipunhere@gmail.com>
Committed: Thu May 14 17:16:10 2015 -0400

----------------------------------------------------------------------
 app/controllers/AdminController.php          |  6 ++
 app/routes.php                               |  2 +
 app/views/admin/manage-resources.blade.php   | 68 +++++++++++++++++++++++
 app/views/admin/manage-users.blade.php       | 11 +---
 app/views/partials/dashboard-block.blade.php |  2 +-
 5 files changed, 78 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/ba097dbc/app/controllers/AdminController.php
----------------------------------------------------------------------
diff --git a/app/controllers/AdminController.php b/app/controllers/AdminController.php
index ae611b4..2c468fe 100644
--- a/app/controllers/AdminController.php
+++ b/app/controllers/AdminController.php
@@ -77,6 +77,12 @@ class AdminController extends BaseController {
 		return View::make("admin/manage-experiments" );
 	}
 
+	public function resourcesView(){
+		$data = CRUtilities::getBrowseCRData();
+		$allCRs = $data["crObjects"];
+		return View::make("admin/manage-resources", array("resources" => $allCRs) );
+	}
+
 	public function addRole(){
 		WSIS::addRole( Input::get("role") );
 		return Redirect::to("admin/dashboard/roles")->with( "message", "Role has been added.");

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/ba097dbc/app/routes.php
----------------------------------------------------------------------
diff --git a/app/routes.php b/app/routes.php
index a0e141c..1c56f88 100755
--- a/app/routes.php
+++ b/app/routes.php
@@ -166,6 +166,8 @@ Route::get("admin/dashboard/roles", "AdminController@rolesView");
 
 Route::get("admin/dashboard/experiments", "AdminController@experimentsView");
 
+Route::get("admin/dashboard/resources", "AdminController@resourcesView");
+
 Route::get("admin/dashboard/experiment/summary", function(){
 	return Redirect::to("experiment/summary?expId=" . $_GET["expId"] . "&dashboard=true");
 });

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/ba097dbc/app/views/admin/manage-resources.blade.php
----------------------------------------------------------------------
diff --git a/app/views/admin/manage-resources.blade.php b/app/views/admin/manage-resources.blade.php
new file mode 100644
index 0000000..b13ef16
--- /dev/null
+++ b/app/views/admin/manage-resources.blade.php
@@ -0,0 +1,68 @@
+@extends('layout.basic')
+
+@section('page-header')
+    @parent
+    {{ HTML::style('css/admin.css')}}
+@stop
+
+@section('content')
+
+    <div id="wrapper">
+            <!-- Sidebar Menu Items - These collapse to the responsive navigation menu
on small screens -->
+            @include( 'partials/dashboard-block')
+        <div id="page-wrapper">
+            <div class="col-md-12">
+            @if( Session::has("message"))
+                <div class="row">
+                    <div class="alert alert-success alert-dismissible" role="alert">
+                        <button type="button" class="close" data-dismiss="alert"><span
aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
+                        {{ Session::get("message") }}
+                    </div>
+                </div>
+                {{ Session::forget("message") }}
+            @endif
+            </div>
+            <div class="container-fluid">
+                <div class="col-md-12">
+                    <h1 class="text-center well alert alert-danger" >Proposed(Dummy)
UI for maintaining availability of Resources. More fields can be added.</h1>
+                    <h1 class="text-center">Resources</h1>
+
+                    <table class="table table-striped table-condensed">
+                        <tr>
+                            <th>ID</th>
+                            <th>Name</th>
+                            <th>
+                                Status
+                            </th>
+                        </tr>
+                        @foreach( (array)$resources as $resourceId => $resourceName )
+                        <tr class="user-row">
+                            <td>{{ $resourceId }}</td>
+                            <td>{{ $resourceName }}</td>
+                            <td>
+                                <!--This is a random selection -->
+                                @if( strpos( $resourceName, "a") )
+                                    <div class="btn-group btn-toggle"> 
+                                        <button class="btn btn-xs btn-default">ON</button>
+                                        <button class="btn btn-xs btn-danger active">Switch
OFF</button>
+                                    </div>
+                                @else
+                                    <div class="btn-group btn-toggle"> 
+                                        <button class="btn btn-xs btn-success active">Switch
ON</button>
+                                        <button class="btn btn-xs btn-default">OFF</button>
+                                    </div>
+                                @endif
+                            </td>
+                        </tr>
+                        @endforeach
+                    </table>
+
+                </div>
+            </div>
+        </div>
+    </div>
+@stop
+
+@section('scripts')
+    @parent
+@stop
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/ba097dbc/app/views/admin/manage-users.blade.php
----------------------------------------------------------------------
diff --git a/app/views/admin/manage-users.blade.php b/app/views/admin/manage-users.blade.php
index e7d96b9..8ea84cd 100644
--- a/app/views/admin/manage-users.blade.php
+++ b/app/views/admin/manage-users.blade.php
@@ -24,16 +24,7 @@
             </div>
             <div class="container-fluid">
                 <div class="col-md-12">
-                    @if( Session::has("message"))
-                        <div class="row">
-                            <div class="alert alert-success alert-dismissible" role="alert">
-                                <button type="button" class="close" data-dismiss="alert"><span
aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
-                                {{ Session::get("message") }}
-                            </div>
-                        </div>
-                        {{ Session::forget("message") }}
-                    @endif
-
+                
                     <h1 class="text-center">Users</h1>
 
                     <table class="table table-striped table-condensed">

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/ba097dbc/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 7f61710..a30530b 100644
--- a/app/views/partials/dashboard-block.blade.php
+++ b/app/views/partials/dashboard-block.blade.php
@@ -13,7 +13,7 @@
                         <a href="{{ URL::to('/')}}/admin/dashboard/credential-store"><i
class="fa fa-fw fa-table"></i>Credential Store</a>
                     </li>
                     <li>
-                        <a href="tables.html"><i class="fa fa-fw fa-table"></i>Resources</a>
+                        <a href="{{ URL::to('/')}}/admin/dashboard/resources"><i
class="fa fa-fw fa-table"></i>Resources</a>
                     </li>
                     <li>
                         <a href="{{ URL::to('/')}}/admin/dashboard/experiments"><i
class="fa fa-fw fa-experiments"></i>Experiments</a>


Mime
View raw message