You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by sm...@apache.org on 2015/03/12 04:55:09 UTC
[37/51] [partial] airavata-php-gateway git commit: importing PGA into
new repo - details are discussed at AIRAVATA-1627
http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/a325e292/app/views/experiment/create.blade.php
----------------------------------------------------------------------
diff --git a/app/views/experiment/create.blade.php b/app/views/experiment/create.blade.php
new file mode 100755
index 0000000..52873f1
--- /dev/null
+++ b/app/views/experiment/create.blade.php
@@ -0,0 +1,55 @@
+@extends('layout.basic')
+
+@section('page-header')
+ @parent
+@stop
+
+@section('content')
+<div class="col-md-offset-3 col-md-6">
+
+ <h1>Create a new experiment</h1>
+
+ <form action="{{URL::to('/')}}/experiment/create" method="POST" role="form" enctype="multipart/form-data">
+
+ <?php
+
+ $disabled = '';
+ $experimentName = '';
+ $experimentDescription = '';
+ $project = '';
+ $application = '';
+
+ $echo = '';
+ $wrf = '';
+ ?>
+
+ <div class="form-group required">
+ <label for="experiment-name" class="control-label">Experiment Name</label>
+ <input type="text" class="form-control" name="experiment-name" id="experiment-name" placeholder="Enter experiment name" autofocus required="required">
+ </div>
+ <div class="form-group">
+ <label for="experiment-description">Experiment Description</label>
+ <textarea class="form-control" name="experiment-description" id="experiment-description" placeholder="Optional: Enter a short description of the experiment"></textarea>
+ </div>
+ <div class="form-group required">
+ <label for="project" class="control-label">Project</label>
+
+
+ {{ Utilities::create_project_select($project, !$disabled) }}
+
+ </div>
+ <div class="form-group">
+ <label for="application">Application</label>
+
+ {{ Utilities::create_application_select($application, !$disabled) }}
+
+ </div>
+ <div class="btn-toolbar">
+ <input name="continue" type="submit" class="btn btn-primary" value="Continue">
+ <input name="clear" type="reset" class="btn btn-default" value="Reset values">
+ </div>
+ </form>
+
+</div>
+
+@stop
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/a325e292/app/views/experiment/edit.blade.php
----------------------------------------------------------------------
diff --git a/app/views/experiment/edit.blade.php b/app/views/experiment/edit.blade.php
new file mode 100755
index 0000000..7e086a2
--- /dev/null
+++ b/app/views/experiment/edit.blade.php
@@ -0,0 +1,143 @@
+@extends('layout.basic')
+
+@section('page-header')
+ @parent
+@stop
+
+@section('content')
+
+<?php
+//$echoResources = array('localhost', 'trestles.sdsc.edu', 'lonestar.tacc.utexas.edu');
+//$wrfResources = array('trestles.sdsc.edu');
+
+//$appResources = array('Echo' => $echoResources, 'WRF' => $wrfResources);
+?>
+
+
+<div class="container">
+
+<h1>Edit Experiment</h1>
+
+<form action="{{URL::to('/')}}/experiment/edit" method="POST" role="form" enctype="multipart/form-data">
+ <input type="hidden" name="expId" value="<?php echo Input::get('expId');?>"/>
+
+ <div class="form-group">
+ <label for="experiment-name">Experiment Name</label>
+ <input type="text"
+ class="form-control"
+ name="experiment-name"
+ id="experiment-name"
+ value="<?php echo $experiment->name; ?>"
+ <?php if(!$expVal['editable']) echo 'disabled' ?>>
+ </div>
+ <div class="form-group">
+ <label for="experiment-description">Experiment Description</label>
+ <textarea class="form-control"
+ name="experiment-description"
+ id="experiment-description"
+ <?php if(!$expVal['editable']) echo 'disabled' ?>><?php echo $experiment->description ?>
+ </textarea>
+ </div>
+ <div class="form-group">
+ <label for="project">Project</label>
+ <?php Utilities::create_project_select($experiment->projectID, $expVal['editable']); ?>
+ </div>
+ <div class="form-group">
+ <label for="application">Application</label>
+ <?php Utilities::create_application_select($experiment->applicationId, false); ?>
+ </div>
+
+ <div class="panel panel-default">
+ <div class="panel-heading">Application configuration</div>
+ <div class="panel-body">
+ <label>Application input</label>
+ <div class="well">
+ <div class="form-group">
+ <p><strong>Current inputs</strong></p>
+ <?php Utilities::list_input_files($experiment); ?>
+ </div>
+ <?php Utilities::create_inputs($experiment->applicationId, false); ?>
+ </div>
+
+ <div class="form-group">
+ <label for="compute-resource">Compute Resource</label>
+ <?php Utilities::create_compute_resources_select($experiment->applicationId, $expVal['scheduling']->resourceHostId); ?>
+ </div>
+
+ <div class="form-group">
+ <label for="node-count">Node Count</label>
+ <input type="number"
+ class="form-control"
+ name="node-count"
+ id="node-count"
+ min="1"
+ value="<?php echo $expVal['scheduling']->nodeCount ?>"
+ <?php if(!$expVal['editable']) echo 'disabled' ?>>
+ </div>
+ <div class="form-group">
+ <label for="cpu-count">Total Core Count</label>
+ <input type="number"
+ class="form-control"
+ name="cpu-count"
+ id="cpu-count"
+ min="1"
+ value="<?php echo $expVal['scheduling']->totalCPUCount ?>"
+ <?php if(!$expVal['editable']) echo 'disabled' ?>>
+ </div>
+ <!--
+ <div class="form-group">
+ <label for="threads">Number of Threads</label>
+ <input type="number"
+ class="form-control"
+ name="threads"
+ id="threads"
+ min="0"
+ value="<?php //echo $expVal['scheduling']->numberOfThreads; ?>"
+ <?php //if(!$expVal['editable']) echo 'disabled'; ?>>
+ </div>
+ -->
+ <div class="form-group">
+ <label for="wall-time">Wall Time Limit</label>
+ <div class="input-group">
+ <input type="number"
+ class="form-control"
+ name="wall-time"
+ id="wall-time"
+ min="0"
+ value="<?php echo $expVal['scheduling']->wallTimeLimit ?>"
+ <?php if(!$expVal['editable']) echo 'disabled' ?>>
+ <span class="input-group-addon">minutes</span>
+ </div>
+ </div>
+ <!--
+ <div class="form-group">
+ <label for="memory">Total Physical Memory</label>
+ <div class="input-group">
+ <input type="number"
+ class="form-control"
+ name="memory"
+ id="memory"
+ min="0"
+ value="<?php //echo $expVal['scheduling']->totalPhysicalMemory; ?>"
+ <?php //if(!$expVal['editable']) echo 'disabled'; ?>>
+ <span class="input-group-addon">kB</span>
+ </div>
+ </div>
+ -->
+ </div>
+ </div>
+
+ <div class="btn-toolbar">
+ <div class="btn-group">
+ <input name="save" type="submit" class="btn btn-primary" value="Save" <?php if(!$expVal['editable']) echo 'disabled' ?>>
+ <input name="launch" type="submit" class="btn btn-success" value="Save and launch" <?php if(!$expVal['editable']) echo 'disabled' ?>>
+ </div>
+ </div>
+
+
+</form>
+
+
+</div>
+
+@stop
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/a325e292/app/views/experiment/search.blade.php
----------------------------------------------------------------------
diff --git a/app/views/experiment/search.blade.php b/app/views/experiment/search.blade.php
new file mode 100755
index 0000000..e33acd0
--- /dev/null
+++ b/app/views/experiment/search.blade.php
@@ -0,0 +1,265 @@
+@extends('layout.basic')
+
+@section('page-header')
+ @parent
+ {{ HTML::style('css/datetimepicker.css')}}
+
+@stop
+
+@section('content')
+
+<div class="container" style="max-width: 750px;">
+<h1>Search for Experiments</h1>
+
+<form action="{{URL::to('/')}}/experiment/search" method="post" class="form-inline" role="form">
+ <div class="form-group">
+ <label for="search-key">Search by</label>
+ <select class="form-control" name="search-key" id="search-key">
+ <?php
+
+ // set up options for select input
+ $values = array('experiment-name', 'experiment-description', 'application', 'creation-time');
+ $labels = array('Experiment Name', 'Experiment Description', 'Application', 'Creation Time');
+ $disabled = array('', '', '', '');
+
+ Utilities::create_options($values, $labels, $disabled);
+
+ ?>
+ </select>
+ </div>
+
+ <div class="form-group search-text-block">
+ <label for="search-value">for</label>
+ <input type="search" class="form-control" name="search-value" id="search-value" placeholder="value" required
+ value="<?php if (isset($_POST['search-value'])) echo $_POST['search-value'] ?>">
+ </div>
+
+ <div class="container select-dates hide">
+ <div class="col-md-12">
+ Select dates between which you want to search for experiments.
+ </div>
+ <div class="col-sm-8" style="height:75px;">
+ <div class='col-md-6'>
+ <div class="form-group">
+ <div class='input-group date' id='datetimepicker9'>
+ <input type='text' class="form-control" placeholder="From Date" name="from-date" value="<?php if (isset($_POST['from-date'])) echo $_POST['from-date'] ?>"/>
+ <span class="input-group-addon"><span class="glyphicon glyphicon-calendar"></span>
+ </span>
+ </div>
+ </div>
+ </div>
+ <div class='col-md-6'>
+ <div class="form-group">
+ <div class='input-group date' id='datetimepicker10'>
+ <input type='text' class="form-control" placeholder="To Date" name="to-date" value="<?php if (isset($_POST['to-date'])) echo $_POST['to-date'] ?>"/>
+ <span class="input-group-addon"><span class="glyphicon glyphicon-calendar"></span>
+ </span>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+
+ <button name="search" type="submit" class="btn btn-primary" value="Search"><span class="glyphicon glyphicon-search"></span> Search</button>
+ <p class="help-block">You can use * as a wildcard character. Tip: search for * alone to retrieve all of your experiments.</p>
+</form>
+
+
+
+
+<?php
+
+if (isset( $expContainer))
+{
+ if (sizeof($expContainer) == 0)
+ {
+ Utilities::print_warning_message('No results found. Please try again.');
+ }
+ else
+ {
+
+?>
+
+ <div class="table-responsive">
+ <table class="table">
+ <tr>
+ <th>Name</th>
+ <th>Application</th>
+ <th>Description</th>
+ <!--<th>Resource</th>-->
+ <th>Creation Time</th>
+ <th>
+ <select class="form-control select-status">
+ <option value="ALL">Status</option>
+ @foreach( $expStates as $index => $state)
+ <option value="{{ $state }}">{{ $state }}</option>
+ @endforeach
+ </select>
+ </th>
+ </tr>
+
+
+<?php
+ foreach ($expContainer as $experiment)
+ {
+ $description = $experiment['experiment']->description;
+ if (strlen($description) > 17) // 17 is arbitrary
+ {
+ $description = substr($experiment['experiment']->description, 0, 17) . '<span class="text-muted">...</span>';
+ }
+
+ echo '<tr>';
+ $addEditOption="";
+ if( $experiment['expValue']['editable'])
+ $addEditOption = '<a href="'. URL::to('/') . '/experiment/edit?expId=' . $experiment['experiment']->experimentID . '" title="Edit"><span class="glyphicon glyphicon-pencil"></span></a>';
+
+ echo '<td>' . $experiment['experiment']->name . $addEditOption . '</td>';
+
+ echo '<td>' . $experiment['expValue']['applicationInterface']->applicationName . '</td>';
+
+ echo '<td>' . $description . '</td>';
+
+ //echo "<td>$computeResource->hostName</td>";
+ echo '<td>' . date('Y-m-d H:i:s', $experiment['experiment']->creationTime/1000) . '</td>';
+
+
+ switch ($experiment['expValue']['experimentStatusString'])
+ {
+ case 'CANCELING':
+ case 'CANCELED':
+ case 'UNKNOWN':
+ $textClass = 'text-warning';
+ break;
+ case 'FAILED':
+ $textClass = 'text-danger';
+ break;
+ case 'COMPLETED':
+ $textClass = 'text-success';
+ break;
+ default:
+ $textClass = 'text-info';
+ break;
+ }
+
+ ?>
+ <td>
+ <a class="<?php echo $textClass; ?>" href="{{ URL::to('/') }}/experiment/summary?expId=<?php echo $experiment['experiment']->experimentID; ?>">
+ <?php echo $experiment['expValue']['experimentStatusString']; ?>
+ </a>
+ </td>
+
+ </tr>
+
+ <?php
+ }
+
+ echo '
+ </table>
+ </div>
+ ';
+ }
+
+
+}
+?>
+
+
+</div>
+
+@stop
+
+@section('scripts')
+ @parent
+ {{ HTML::script('js/moment.js')}}
+ {{ HTML::script('js/datetimepicker.js')}}
+
+ <script type="text/javascript">
+
+ $(document).ready( function(){
+
+ /* script to make status select work on the UI side itself. */
+
+ $(".select-status").on("change", function(){
+ selectedStatus = this.value;
+
+ if( selectedStatus == "ALL")
+ {
+ $("table tr").slideDown();
+ }
+ else
+ {
+ $("table tr").each(function(index) {
+ if (index != 0) {
+
+ $row = $(this);
+
+ var status = $.trim( $row.find("td:last").text() );
+ if (status == selectedStatus )
+ {
+ $(this).slideDown();
+ }
+ else {
+ $(this).slideUp();
+ }
+ }
+ });
+ }
+ });
+
+ /* making datetimepicker work for exp search */
+
+ $('#datetimepicker9').datetimepicker({
+ pick12HourFormat: false
+ });
+ $('#datetimepicker10').datetimepicker({
+ pick12HourFormat: false
+ });
+ $("#datetimepicker9").on("dp.change",function (e) {
+ $('#datetimepicker10').data("DateTimePicker").setMinDate(e.date);
+ });
+ $("#datetimepicker10").on("dp.change",function (e) {
+ $('#datetimepicker9').data("DateTimePicker").setMaxDate(e.date);
+ });
+
+ /* selecting creation time */
+ $("#search-key").on("change", function(){
+ if( this.value == "creation-time")
+ {
+ $(".search-text-block").addClass("hide");
+ $(".select-dates").removeClass("hide");
+ $("#search-value").removeAttr("required");
+
+ }
+ else
+ {
+ $(".search-text-block").removeClass("hide");
+ $(".select-dates").addClass("hide");
+ $("#search-value").attr("required");
+ }
+ });
+
+ changeInputVisibility( $("#search-key").val() );
+
+ });
+
+ function changeInputVisibility( selectedStatus)
+ {
+ if( selectedStatus == "creation-time")
+ {
+ $(".search-text-block").addClass("hide");
+ $(".select-dates").removeClass("hide");
+ $("#search-value").removeAttr("required");
+
+ }
+ else
+ {
+ $(".search-text-block").removeClass("hide");
+ $(".select-dates").addClass("hide");
+ $("#search-value").attr("required");
+ }
+ }
+
+
+
+ </script>
+@stop
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/a325e292/app/views/experiment/summary.blade.php
----------------------------------------------------------------------
diff --git a/app/views/experiment/summary.blade.php b/app/views/experiment/summary.blade.php
new file mode 100755
index 0000000..1ca71de
--- /dev/null
+++ b/app/views/experiment/summary.blade.php
@@ -0,0 +1,126 @@
+@extends('layout.basic')
+
+@section('page-header')
+ @parent
+@stop
+
+@section('content')
+
+<div class="container" style="max-width: 750px;">
+<h1>
+ Experiment Summary
+ <small><a href="{{ URL::to('/') }}/experiment/summary?expId={{ $experiment->experimentID }}"
+ title="Refresh"><span class="glyphicon glyphicon-refresh refresh-exp"></span></a></small>
+</h1>
+
+ <table class="table">
+ <tr>
+ <td><strong>Name</strong></td>
+ <td><?php echo $experiment->name; ?></td>
+ </tr>
+ <tr>
+ <td><strong>Description</strong></td>
+ <td><?php echo $experiment->description; ?></td>
+ </tr>
+ <tr>
+ <td><strong>Project</strong></td>
+ <td><?php echo $project->name; ?></td>
+ </tr>
+ <tr>
+ <td><strong>Application</strong></td>
+ <td><?php echo $expVal["applicationInterface"]->applicationName; ?></td>
+ </tr>
+ <tr>
+ <td><strong>Compute resource</strong></td>
+ <td><?php echo $expVal["computeResource"]->hostName; ?></td>
+ </tr>
+ <tr>
+ <td><strong>Experiment Status</strong></td>
+ <td class="exp-status"><?php echo $expVal["experimentStatusString"]; ?></td>
+ </tr>
+ <?php
+ if ($expVal["jobState"]) echo '
+ <tr>
+ <td><strong>Job Status</strong></td>
+ <td>' . $expVal["jobState"] . '</td>
+ </tr>
+ ';
+ ?>
+ <tr>
+ <td><strong>Creation time</strong></td>
+ <td><?php echo $expVal["experimentCreationTime"]; ?></td>
+ </tr>
+ <tr>
+ <td><strong>Update time</strong></td>
+ <td><?php echo $expVal["experimentTimeOfStateChange"]; ?></td>
+ </tr>
+ <tr>
+ <td><strong>Inputs</strong></td>
+ <td><?php Utilities::list_input_files($experiment); ?></td>
+ </tr>
+ <tr>
+ <td><strong>Outputs</strong></td>
+ <td><?php if ($expVal["experimentStatusString"] == 'COMPLETED') Utilities::list_output_files($experiment); ?></td>
+ </tr>
+ @if( $expVal["experimentStatusString"] == "FAILED")
+ <tr>
+ <td><strong>Errors</strong></td>
+ <td>
+ @foreach( (array)$experiment->errors as $error)
+ {{ $error->actualErrorMessage }}
+ @endforeach
+ </td>
+ </tr>
+ @endif
+
+ </table>
+
+ <form action="{{URL::to('/') }}/experiment/summary" method="post" role="form">
+ <div class="btn-toolbar">
+ <input name="launch"
+ type="submit"
+ class="btn btn-success"
+ value="Launch"
+ title="Launch the experiment" <?php if(!$expVal["editable"] ) echo 'disabled' ?>>
+ <!--<input name="cancel" type="submit" class="btn btn-warning" value="Cancel" <?php //if(!$cancelable) echo 'disabled'; ?>>-->
+ <input name="clone"
+ type="submit"
+ class="btn btn-primary"
+ value="Clone"
+ title="Create a clone of the experiment. Cloning is the only way to change an experiment's settings
+ after it has been launched.">
+ <input type="hidden" name="expId" value="{{ Input::get('expId') }}"/>
+ <a href="{{URL::to('/') }}/experiment/edit?expId={{ $experiment->experimentID }}"
+ class="btn btn-default"
+ role="button"
+ title="Edit the experiment's settings" <?php if(!$expVal["editable"] ) echo 'disabled' ?>>
+ <span class="glyphicon glyphicon-pencil"></span>
+ Edit
+ </a>
+ </div>
+ </form>
+ <input type="hidden" id="expObj" value="{{ htmlentities( json_encode( $experiment)) }}"/>
+</div>
+
+@stop
+
+@section('scripts')
+ @parent
+ <script>
+ setInterval( function(){
+ if( $.trim( $(".exp-status").html() ) != "COMPLETED")
+ {
+ $.ajax({
+ type:"GET",
+ url: "{{URL::to('/') }}/experiment/summary",
+ data: {expId: "{{ Input::get('expId') }}" },
+ success: function( exp){
+ if( $.trim( $("#expObj").val() ) != $.trim( exp) )
+ $(".refresh-exp").click();
+
+ }
+ });
+ }
+ }, 3000);
+ </script>
+@stop
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/a325e292/app/views/gateway/browse.blade.php
----------------------------------------------------------------------
diff --git a/app/views/gateway/browse.blade.php b/app/views/gateway/browse.blade.php
new file mode 100644
index 0000000..6d26a06
--- /dev/null
+++ b/app/views/gateway/browse.blade.php
@@ -0,0 +1,218 @@
+@extends('layout.basic')
+
+@section('page-header')
+ @parent
+@stop
+
+@section('content')
+
+<div class="container">
+ <div class="col-md-offset-2 col-md-8">
+ <div class="row">
+ <a href="{{URL::to('/')}}/gp/create">
+ <button class="btn btn-default create-gateway-profile">Create a new Gateway Resource Profile</button>
+ </a>
+ </div>
+ @if( count( $gatewayProfiles) )
+ @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">×</span><span class="sr-only">Close</span></button>
+ {{ Session::get("message") }}
+ </div>
+ </div>
+ {{ Session::forget("message") }}
+ @endif
+ <div class="row">
+
+ <div class="col-md-6">
+ <h3>Existing Gateway Resource Profiles :</h3>
+ </div>
+ <div class="col-md-6" style="margin-top:3.5%">
+ <input type="text" class="col-md-12 filterinput" placeholder="Search by Gateway Name" />
+ </div>
+ </div>
+ <div class="panel-group" id="accordion1">
+ @foreach( $gatewayProfiles 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="#accordion" href="#collapse-gateway-{{$indexGP}}">
+ {{ $gp->gatewayName }}
+ </a>
+ <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 }}" data-gp-desc="{{ $gp->gatewayDescription }}"></span>
+ <span class="glyphicon glyphicon-trash delete-gateway" style="cursor:pointer;" data-toggle="modal" data-target="#delete-gateway-block" data-gp-name="{{$gp->gatewayName}}" data-gp-id="{{ $gp->gatewayID }}"></span>
+ </div>
+ </h4>
+ </div>
+ <div id="collapse-gateway-{{$indexGP}}" class="panel-collapse collapse">
+ <div class="panel-body">
+ <div class="app-interface-block">
+ <h5>{{ $gp->gatewayDescription}}</h5>
+ <hr/>
+ <div class="row">
+ <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</button>
+ </div>
+ </div>
+ @if( count( $gp->computeResourcePreferences) )
+ <div class="col-md-12">
+ <h3>Existing Compute Resources :</h3>
+ </div>
+ <div class="accordion-inner">
+ <div class="panel-group" id="accordion-{{$indexGP}}">
+ @foreach( (array)$gp->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>
+ <div class="pull-right col-md-2 gateway-options fade">
+ <span class="glyphicon glyphicon-remove remove-resource" style="cursor:pointer;" data-toggle="modal" data-target="#remove-resource-block" data-cr-name="{{$crp->crDetails->hostName}}" data-cr-id="{{$crp->computeResourceId}}" data-gp-id="{{ $gp->gatewayID }}"></span>
+ </div>
+ </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/gateway-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>
+ @endforeach
+ </div>
+ @endif
+ </div>
+</div>
+
+<div class="add-compute-resource-block hide">
+ <div class="well">
+ <form action="{{URL::to('/')}}/gp/add-crp" method="POST">
+ <input type="hidden" name="gatewayId" id="gatewayId" value="">
+ <div class="input-group">
+ <select name="computeResourceId" class="cr-select form-control">
+ <option value="">Select a compute Resource and set its preferences</option>
+ @foreach( (array)$computeResources as $index => $cr)
+ <option value="{{ $cr->computeResourceId}}">{{ $cr->hostName }}</option>
+ @endforeach
+ </select>
+ <span class="input-group-addon remove-cr" style="cursor:pointer;">x</span>
+ </div>
+ <div class="pref-space form-horizontal"></div>
+ </form>
+ </div>
+</div>
+
+<!-- Edit a Gateway Modal -->
+<div class="modal fade" id="edit-gateway-block" tabindex="-1" role="dialog" aria-labelledby="add-modal" aria-hidden="true">
+ <div class="modal-dialog">
+
+ <form action="{{URL::to('/')}}/gp/edit" method="POST">
+ <div class="modal-content">
+ <div class="modal-header">
+ <h3 class="text-center">Edit Gateway</h3>
+ </div>
+ <div class="modal-body">
+ <input type="hidden" class="form-control edit-gpId" name="edit-gpId"/>
+ <div class="form-group required">
+ <label class="control-label">Gateway Name</label>
+ <input class="form-control edit-gp-name" maxlength="100" name="gatewayName" required="required" placeholder="Gateway Name"/>
+ </div>
+ <div class="form-group">
+ <label class="control-label">Gateway Description</label>
+ <textarea class="form-control edit-gp-desc" maxlength="255" name="gatewayDescription" placeholder="Gateway Description"></textarea>
+ </div>
+ </div>
+ <div class="modal-footer">
+ <div class="form-group">
+ <input type="submit" class="btn btn-primary" value="Update"/>
+ <input type="button" class="btn btn-default" data-dismiss="modal" value ="Cancel"/>
+ </div>
+ </div>
+ </div>
+
+ </form>
+ </div>
+</div>
+
+<!-- delete a Gateway Modal -->
+<div class="modal fade" id="delete-gateway-block" tabindex="-1" role="dialog" aria-labelledby="add-modal" aria-hidden="true">
+ <div class="modal-dialog">
+
+ <form action="{{URL::to('/')}}/gp/delete-gp" method="POST">
+ <div class="modal-content">
+ <div class="modal-header">
+ <h3 class="text-center">Delete Gateway Profile Confirmation</h3>
+ </div>
+ <div class="modal-body">
+ <input type="hidden" class="form-control delete-gpId" name="del-gpId"/>
+ Do you really want to delete the Gateway Profile, <span class="delete-gp-name"></span> ?
+ </div>
+ <div class="modal-footer">
+ <div class="form-group">
+ <input type="submit" class="btn btn-danger" value="Delete"/>
+ <input type="button" class="btn btn-default" data-dismiss="modal" value ="Cancel"/>
+ </div>
+ </div>
+ </div>
+
+ </form>
+ </div>
+</div>
+
+<!-- Remove a Compute Resource from a Gateway -->
+<div class="modal fade" id="remove-resource-block" tabindex="-1" role="dialog" aria-labelledby="add-modal" aria-hidden="true">
+ <div class="modal-dialog">
+
+ <form action="{{URL::to('/')}}/gp/remove-cr" method="POST">
+ <div class="modal-content">
+ <div class="modal-header">
+ <h3 class="text-center">Remove Compute Resource Confirmation</h3>
+ </div>
+ <div class="modal-body">
+ <input type="hidden" class="form-control remove-crId" name="rem-crId"/>
+ <input type="hidden" class="form-control cr-gpId" name="gpId"/>
+
+ Do you really want to remove the Compute Resource, <span class="remove-cr-name"> </span>from the selected Gateway?
+ </div>
+ <div class="modal-footer">
+ <div class="form-group">
+ <input type="submit" class="btn btn-danger" value="Remove"/>
+ <input type="button" class="btn btn-default" data-dismiss="modal" value ="Cancel"/>
+ </div>
+ </div>
+ </div>
+
+ </form>
+ </div>
+</div>
+
+<!-- contains all compute resource choices that might get selected on adding a new one to a gateway -->
+@foreach( (array)$computeResources as $index => $cr)
+ @include('partials/gateway-preferences', array('computeResource' => $cr, 'crData' => $crData))
+@endforeach
+
+
+@stop
+
+@section('scripts')
+ @parent
+ {{ HTML::script('js/gateway.js') }}
+@stop
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/a325e292/app/views/gateway/create.blade.php
----------------------------------------------------------------------
diff --git a/app/views/gateway/create.blade.php b/app/views/gateway/create.blade.php
new file mode 100644
index 0000000..24cba9c
--- /dev/null
+++ b/app/views/gateway/create.blade.php
@@ -0,0 +1,34 @@
+@extends('layout.basic')
+
+@section('page-header')
+ @parent
+@stop
+
+@section('content')
+
+<div class="container">
+ <div class="col-md-offset-2 col-md-8">
+ <h3>Create a Gateway</h3>
+ <form role="form" method="POST" action="{{ URL::to('/') }}/gp/create">
+ <div class="form-group required">
+ <label class="control-label">Enter Name</label>
+ <input class="form-control hostName" maxlength="100" name="gatewayName" required="required" placeholder="Gateway Name"/>
+ </div>
+ <div class="form-group">
+ <label class="control-label">Enter Description</label>
+ <textarea class="form-control" maxlength="255" name="gatewayDescription" placeholder="Gateway Description"></textarea>
+ </div>
+ <div class="form-group">
+ <input type="submit" class="btn btn-lg btn-primary" value="Create"/>
+ <input type="reset" class="btn btn-lg btn-success" value="Reset"/>
+ </div>
+ </form>
+ </div>
+</div>
+
+@stop
+
+@section('scripts')
+ @parent
+ {{ HTML::script('js/script.js') }}
+@stop
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/a325e292/app/views/home.blade.php
----------------------------------------------------------------------
diff --git a/app/views/home.blade.php b/app/views/home.blade.php
new file mode 100755
index 0000000..c016008
--- /dev/null
+++ b/app/views/home.blade.php
@@ -0,0 +1,186 @@
+@extends('layout.basic')
+
+@section('page-header')
+ @parent
+@stop
+
+@section('content')
+
+<div class="well">
+ <div class="container">
+
+ <?php
+
+ if (Utilities::id_in_session())
+ {
+ $columnClass = 'col-md-4';
+ if( Session::has("admin"))
+ $admin = " Admin";
+ else
+ $admin = "";
+
+ echo '<h4>Welcome'. $admin . ', '. Session::get("username") . '!</h4>';
+
+ if( Session::get("username") == 'admin1') // temporary hard-coded admin user. will replace with admin role in future
+ {
+ try
+ {
+ Utilities::open_tokens_file($tokenFilePath);
+ }
+ catch (Exception $e)
+ {
+ Utilities::print_error_message($e->getMessage());
+ }
+
+
+ if(isset($_GET['tokenId']))
+ {
+ try
+ {
+ Utilities::write_new_token($_GET['tokenId']);
+
+ Utilties::print_success_message('Received new XSEDE token ' . $tokenFile->tokenId .
+ '! Click <a href="' . $req_url .
+ '?gatewayName=' . $gatewayName .
+ '&email=' . $email .
+ '&portalUserName=' . $_SESSION['username'] .
+ '">here</a> to fetch a new token.');
+ }
+ catch (Exception $e)
+ {
+ print_error_message($e->getMessage());
+ }
+ }
+ else
+ {
+ echo '<p><small>Community token currently set to ' . $tokenFile->tokenId .
+ '. Click <a href="' . $req_url .
+ '?gatewayName=' . $gatewayName .
+ '&email=' . $email .
+ '&portalUserName=' . $_SESSION['username'] .
+ '">here</a> to fetch a new token.</small></p>';
+ }
+ }
+ else // standard user
+ {
+ /* temporarily remove to avoid confusion during XSEDE tutorial
+ if (isset($_SESSION['tokenId']))
+ {
+ echo '<p><small>XSEDE token currently active.
+ All experiments launched during this session will use your personal allocation.</small></p>';
+ }
+ elseif(!isset($_GET['tokenId']) && !isset($_SESSION['tokenId']))
+ {
+ echo '<p><small>Currently using community allocation. Click <a href="' .
+ $req_url .
+ '?gatewayName=' . $gatewayName .
+ '&email=' . $email .
+ '&portalUserName=' . $_SESSION['username'] .
+ '">here</a> to use your personal allocation for this session.</small></p>';
+ }
+ elseif(isset($_GET['tokenId']))
+ {
+ $_SESSION['tokenId'] = $_GET['tokenId'];
+
+ print_success_message('Received XSEDE token!' .
+ '<br>All experiments launched during this session will use your personal allocation.');
+ }
+ */
+ }
+ }
+ else
+ {
+ $columnClass = 'col-md-6';
+
+ echo '
+ <h1>PHP Gateway with Airavata</h1>
+ <p>
+ PGA is a science gateway built with the Airavata API. You can reference PGA as you integrate Airavata
+ into your own gateway, or you can create your gateway on top of PGA by cloning it at the link below.
+ PGA is known to work well in the Chrome, Firefox, and Internet Explorer browsers.
+ </p>
+ <p><a href="https://github.com/SciGaP/PHP-Reference-Gateway"
+ target="_blank">See the code <span class="glyphicon glyphicon-new-window"></span></a></p>
+ <p><a href="https://cwiki.apache.org/confluence/display/AIRAVATA/XSEDE+2014+Tutorial"
+ target="_blank">View the XSEDE 2014 tutorial documentation <span class="glyphicon glyphicon-new-window"></span></a></p>
+ ';
+ }
+
+ ?>
+
+
+
+
+
+
+
+
+ </div>
+</div>
+
+<div class="container">
+
+ <div class="row">
+ <?php
+
+ if (Utilities::id_in_session())
+ {
+ echo '
+ <div class="col-md-4">
+ <h2>PHP Gateway with Airavata</h2>
+
+ <p>
+ PGA is a science gateway built with the Airavata API. You can reference PGA as you integrate
+ Airavata into your own gateway, or you can create your gateway on top of PGA by cloning it at
+ the link below. PGA is known to work well in the Chrome, Firefox, and Internet Explorer browsers.
+ </p>
+ <p><a href="https://github.com/SciGaP/PHP-Reference-Gateway"
+ target="_blank">See the code <span class="glyphicon glyphicon-new-window"></span></a></p>
+ <p><a href="https://cwiki.apache.org/confluence/display/AIRAVATA/XSEDE+2014+Tutorial"
+ target="_blank">View the XSEDE 2014 tutorial documentation <span class="glyphicon glyphicon-new-window"></span></a></p>
+ </div>
+ ';
+ }
+
+ ?>
+ <div class="<?php echo $columnClass; ?>">
+ <div class="thumbnail" style="border:none">
+ <img src="assets/scigap-header-logo.png" alt="SciGaP">
+ <div class="caption">
+ <p>
+ SciGaP is a hosted service with a public API that science gateways can use to manage
+ applications and workflows running on remote supercomputers, as well as other services. Gateway
+ developers can thus concentrate their efforts on building their scientific communities and not
+ worry about operations.
+ </p>
+ <p>
+ Science Gateway Platform as a Service (SciGaP) provides application programmer interfaces (APIs)
+ to hosted generic infrastructure services that can be used by domain science communities to
+ create Science Gateways.
+ </p>
+ <p><a href="http://scigap.org/"
+ target="_blank">Learn more <span class="glyphicon glyphicon-new-window"></span></a></p>
+ </div>
+ </div>
+ </div>
+ <div class="<?php echo $columnClass; ?>">
+ <div class="thumbnail" style="border:none">
+ <img src="assets/PoweredbyAiravata_Small.png" alt="SciGaP">
+ <div class="caption">
+ <p>
+ Apache Airavata is a software framework which is dominantly used to build Web-based science
+ gateways and assist to compose, manage, execute and monitor large scale applications and
+ workflows on distributed computing resources such as local clusters, supercomputers, national
+ grids, academic and commercial clouds. Airavata mainly supports long running applications and
+ workflows on distributed computational resources.
+ </p>
+ <p><a href="http://airavata.apache.org/" target="_blank">Learn more <span class="glyphicon glyphicon-new-window"></span></a></p>
+ </div>
+ </div>
+ </div>
+ </div>
+
+</div>
+
+@stop
+
http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/a325e292/app/views/layout/basic.blade.php
----------------------------------------------------------------------
diff --git a/app/views/layout/basic.blade.php b/app/views/layout/basic.blade.php
new file mode 100755
index 0000000..7bebad9
--- /dev/null
+++ b/app/views/layout/basic.blade.php
@@ -0,0 +1,102 @@
+@section ('page-header')
+
+<!DOCTYPE html>
+ <html lang="en">
+ <head>
+ <title>PHP Reference Gateway</title>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <link rel="icon" href="resources/assets/favicon.ico" type="image/x-icon">
+ {{ HTML::style('css/bootstrap.min.css')}}
+ </head>
+
+<?php
+
+//Is there a need to connect to id store at this point? Commented for now.
+//Utilities::connect_to_id_store();
+
+?>
+
+<body>
+
+<?php Utilities::create_nav_bar(); ?>
+
+<?php
+ // Alerts if guests users try to go to the link without signing in.
+ if( Session::has("login-alert"))
+ {
+ Utilities::print_error_message("You need to login to use this service.");
+ Session::forget("login-alert");
+ }
+ // if signed in user is not an admin.
+ if( Session::has("admin-alert"))
+ {
+ Utilities::print_error_message("You need to be an admin to use this service.");
+ Session::forget("admin-alert");
+ }
+
+?>
+
+@show
+
+@yield('content')
+
+</body>
+@section('scripts')
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
+ <script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
+
+ <!-- Jira Issue Collector - Report Issue -->
+ <script type="text/javascript"
+ src="https://gateways.atlassian.net/s/31280375aecc888d5140f63e1dc78a93-T/en_USmlc07/6328/46/1.4.13/_/download/batch/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector.js?locale=en-US&collectorId=b1572922"></script>
+
+ <!-- Jira Issue Collector - Request Feature -->
+ <script type="text/javascript"
+ src="https://gateways.atlassian.net/s/31280375aecc888d5140f63e1dc78a93-T/en_USmlc07/6328/46/1.4.13/_/download/batch/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector.js?locale=en-US&collectorId=674243b0"></script>
+
+
+ <script type="text/javascript">
+ window.ATL_JQ_PAGE_PROPS = $.extend(window.ATL_JQ_PAGE_PROPS, {
+ "b1572922":
+ {
+ "triggerFunction": function(showCollectorDialog) {
+ //Requries that jQuery is available!
+ jQuery("#report-issue").click(function(e) {
+ e.preventDefault();
+ showCollectorDialog();
+ });
+ }
+ },
+ "674243b0":
+ {
+ "triggerFunction": function(showCollectorDialog) {
+ //Requries that jQuery is available!
+ jQuery("#request-feature").click(function(e) {
+ e.preventDefault();
+ showCollectorDialog();
+ });
+ }
+ }
+ });
+
+ var highest = null;
+ $(".nav-tabs a").each(function(){ //find the height of your highest link
+ var h = $(this).height();
+ if(h > highest){
+ highest = $(this).height();
+ }
+ });
+
+ $(".nav-tabs a").height(highest); //set all your links to that height.
+
+
+ // not letting users to add only spaces in text boxes.
+ $("body").on( "blur", ".form-control", function(){
+ $(this).val( $.trim( $(this).val() ) );
+ });
+
+ </script>
+
+@show
+
+</html>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/a325e292/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
new file mode 100644
index 0000000..b4f405b
--- /dev/null
+++ b/app/views/partials/dashboard-block.blade.php
@@ -0,0 +1,44 @@
+<div class="collapse navbar-collapse navbar-ex1-collapse">
+ <ul class="nav navbar-nav side-nav">
+ <li @if( Session::has("manage")) class="active" @endif>
+ <a href="{{ URL::to('/')}}/admin/dashboard/gateway"><i class="fa fa-fw fa-dashboard"></i> Gateways</a>
+ </li>
+ <li>
+ <a href="{{ URL::to('/')}}/admin/dashboard/users"><i class="fa fa-fw fa-bar-chart-o"></i> Users</a>
+ </li>
+ <li>
+ <a href="{{ URL::to('/')}}/admin/dashboard/roles"><i class="fa fa-fw fa-table"></i>Roles</a>
+ </li>
+ <li>
+ <a href="tables.html"><i class="fa fa-fw fa-table"></i> Resources</a>
+ </li>
+ <li>
+ <a href="forms.html"><i class="fa fa-fw fa-edit"></i> Settings</a>
+ </li>
+ <!--
+ <li>
+ <a href="bootstrap-elements.html"><i class="fa fa-fw fa-desktop"></i> Bootstrap Elements</a>
+ </li>
+ <li>
+ <a href="bootstrap-grid.html"><i class="fa fa-fw fa-wrench"></i> Bootstrap Grid</a>
+ </li>
+ <li>
+ <a href="javascript:;" data-toggle="collapse" data-target="#demo"><i class="fa fa-fw fa-arrows-v"></i> Dropdown <i class="fa fa-fw fa-caret-down"></i></a>
+ <ul id="demo" class="collapse">
+ <li>
+ <a href="#">Dropdown Item</a>
+ </li>
+ <li>
+ <a href="#">Dropdown Item</a>
+ </li>
+ </ul>
+ </li>
+ <li>
+ <a href="blank-page.html"><i class="fa fa-fw fa-file"></i> Blank Page</a>
+ </li>
+ <li>
+ <a href="index-rtl.html"><i class="fa fa-fw fa-dashboard"></i> RTL Dashboard</a>
+ </li>
+ -->
+ </ul>
+ </div>
http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/a325e292/app/views/partials/deployment-block.blade.php
----------------------------------------------------------------------
diff --git a/app/views/partials/deployment-block.blade.php b/app/views/partials/deployment-block.blade.php
new file mode 100644
index 0000000..b624c3a
--- /dev/null
+++ b/app/views/partials/deployment-block.blade.php
@@ -0,0 +1,125 @@
+<!-- Application Deployments do not have a name. :(
+<div class="form-group" required>
+ <label class="control-label">Application Deployment Name</label>
+ <input type="text" class="form-control" name="applicationName" value="Class not saving it anywhere." readonly/>
+</div>
+-->
+@if( isset( $deploymentObject) )
+ <input type="hidden" name="app-deployment-id" value="{{$deploymentObject->appDeploymentId}}"/>
+@endif
+<div class="form-group required">
+ <label class="control-label">Application Module</label>
+ <select name="appModuleId" class="form-control app-module-filter" required readonly>
+ @foreach( $modules as $index => $module)
+ <option value="{{ $module->appModuleId }}" @if( isset( $deploymentObject) ) @if( $module->appModuleId == $deploymentObject->appModuleId) selected @endif @endif>{{ $module->appModuleName }}</option>
+ @endforeach
+ </select>
+</div>
+<div class="form-group required">
+ <label class="control-label">Application Compute Host</label>
+ <select name="computeHostId" class="form-control" required readonly>
+ @foreach( $computeResources as $id => $crName)
+ <option value="{{ $id }}" @if( isset( $deploymentObject) ) @if( $id == $deploymentObject->computeHostId) selected @endif @endif>{{ $crName }}</option>
+ @endforeach
+ </select>
+</div>
+<div class="form-group required">
+ <label class="control-label">Application Executable Path</label>
+ <input type="text" class="form-control" name="executablePath" value="@if( isset( $deploymentObject)){{$deploymentObject->executablePath}}@endif" required readonly/>
+</div>
+<div class="form-group required">
+ <label class="control-label">Application Parallelism Type</label>
+ <select name="parallelism" class="form-control" readonly>
+ @foreach( $applicationParallelismTypes as $index=>$parallelismType)
+ <option value="{{$index}}" @if( isset( $deploymentObject) ) @if( $index == $deploymentObject->parallelism) selected @endif @endif>{{ $parallelismType }}</option>
+ @endforeach
+ </select>
+</div>
+<div class="form-group">
+ <label class="control-label">Application Deployment Description</label>
+ <textarea class="form-control" name="appDeploymentDescription" readonly>@if( isset( $deploymentObject)){{$deploymentObject->appDeploymentDescription}}@endif</textarea>
+</div>
+<hr/>
+<div class="form-group">
+ <div class="show-load-cmds">
+ @if( isset( $deploymentObject))
+ @foreach( (array)$deploymentObject->moduleLoadCmds as $index => $cmd)
+ <input name="moduleLoadCmds[]" type="text" class="form-control" placeholder="Module Load Command" value="{{$cmd}}" readonly />
+ @endforeach
+ @endif
+ </div>
+ <button type="button" class="btn btn-default control-label add-load-cmd hide">Add Module Load Commands</label>
+</div>
+<hr/>
+<div class="form-group">
+ <div class="show-lib-prepend-paths">
+ <h5>Library Prepend Paths</h5>
+ @if( isset( $deploymentObject))
+ @foreach( (array)$deploymentObject->libPrependPaths as $path)
+ <div class="col-md-12 well">
+ <input name="libraryPrependPathName[]" type="text" class="col-md-4" placeholder="Name" value="{{$path->name}}" readonly/>
+ <input name="libraryPrependPathValue[]" type="text" class="col-md-8" placeholder="Value" value="{{$path->value}}" readonly/>
+ </div>
+ @endforeach
+ @endif
+ </div>
+ <button type="button" class="btn btn-default control-label add-lib-prepend-path hide">Add a Library Prepend Path</label>
+</div>
+<hr/>
+<div class="form-group">
+ <div class="show-lib-append-paths">
+ <h5>Library Append Paths</h5>
+ @if( isset( $deploymentObject))
+ @foreach( (array)$deploymentObject->libAppendPaths as $path)
+ <div class="col-md-12 well">
+ <input name="libraryAppendPathName[]" type="text" class="col-md-4" placeholder="Name" value="{{$path->name}}" readonly/>
+ <input name="libraryAppendPathValue[]" type="text" class="col-md-8" placeholder="Value" value="{{$path->value}}" readonly/>
+ </div>
+ @endforeach
+ @endif
+ </div>
+ <button type="button" class="btn btn-default control-label add-lib-append-path hide">Add a Library Append Path</label>
+</div>
+<hr/>
+<div class="form-group">
+ <div class="show-environments">
+ <h5>Environments</h5>
+ @if( isset( $deploymentObject))
+ @foreach( (array)$deploymentObject->setEnvironment as $path)
+ <div class="col-md-12 well">
+ <input name="environmentName[]" type="text" class="col-md-4" placeholder="Name" value="{{$path->name}}" readonly/>
+ <input name="environmentValue[]" type="text" class="col-md-8" placeholder="Value" value="{{$path->value}}" readonly/>
+ </div>
+ @endforeach
+ @endif
+ </div>
+ <button type="button" class="btn btn-default control-label add-environment hide">Add Environment</label>
+</div>
+
+<div class="form-group">
+ <div class="show-preJobCommands">
+ <h5>Pre Job Commands</h5>
+ @if( isset( $deploymentObject))
+ @foreach( (array)$deploymentObject->preJobCommands as $preJobCommand)
+ <div class="col-md-12 well">
+ <input name="preJobCommand[]" type="text" class="col-md-12" placeholder="Pre Job Command" value="{{$preJobCommand}}" readonly/>
+ </div>
+ @endforeach
+ @endif
+ </div>
+ <button type="button" class="btn btn-default control-label add-preJobCommand hide">Add Pre Job Command</label>
+</div>
+
+<div class="form-group">
+ <div class="show-postJobCommands">
+ <h5>Post Job Commands</h5>
+ @if( isset( $deploymentObject))
+ @foreach( (array)$deploymentObject->postJobCommands as $postJobCommand)
+ <div class="col-md-12 well">
+ <input name="postJobCommand[]" type="text" class="col-md-12" placeholder="Post Job Command" value="{{$postJobCommand}}" readonly/>
+ </div>
+ @endforeach
+ @endif
+ </div>
+ <button type="button" class="btn btn-default control-label add-postJobCommand hide">Add Post Job Command</label>
+</div>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/a325e292/app/views/partials/gateway-preferences.blade.php
----------------------------------------------------------------------
diff --git a/app/views/partials/gateway-preferences.blade.php b/app/views/partials/gateway-preferences.blade.php
new file mode 100644
index 0000000..de8d5d8
--- /dev/null
+++ b/app/views/partials/gateway-preferences.blade.php
@@ -0,0 +1,60 @@
+<!-- String replace is done as Jquery creates problems when using period(.) in id or class. -->
+<div id="cr-{{ str_replace( '.', "_", $computeResource->computeResourceId) }}" class="@if(isset( $show) ) @if( !$show) hide @endif @else hide @endif">
+ <h3 class="text-center">Set Preferences</h3>
+ <div class="form-group">
+ <label class="control-label col-md-3">Override by Airavata</label>
+ <div class="col-md-9">
+ <select class="form-control" name="overridebyAiravata">
+ <option value="1" @if( isset( $preferences) ) @if( 1 == $preferences->overridebyAiravata) selected @endif @endif>True</option>
+ <option value="0" @if( isset( $preferences) ) @if( 0 == $preferences->overridebyAiravata) selected @endif @endif>False</option>
+ </select>
+ </div>
+ </div><br/>
+ <div class="form-group">
+ <label class="control-label col-md-3">Preferred Job Submission Protocol</label>
+ <div class="col-md-9">
+ <select name="preferredJobSubmissionProtocol" class="form-control">
+ @foreach( (array)$computeResource->jobSubmissionInterfaces as $index => $jsi)
+ <option value="{{ $jsi->jobSubmissionInterfaceId}}" @if( isset( $preferences) ) @if( $preferences->preferredJobSubmissionProtocol == $jsi->jobSubmissionProtocol) selected @endif @endif>{{ $crData["jobSubmissionProtocols"][$jsi->jobSubmissionProtocol] }}</option>
+ @endforeach
+ </select>
+
+ </div>
+ </div>
+ <br/>
+ <div class="form-group">
+ <label class="control-label col-md-3">Preferred Data Movement Protocol</label>
+ <div class="col-md-9">
+ <select name="preferredDataMovementProtocol" class="form-control">
+ @foreach( (array)$computeResource->dataMovementInterfaces as $index => $dmi)
+ <option value="{{ $dmi->dataMovementInterfaceId}}" @if( isset( $preferences) ) @if( $preferences->preferredDataMovementProtocol == $dmi->dataMovementProtocol) selected @endif @endif>{{ $crData["dataMovementProtocols"][$dmi->dataMovementProtocol] }}</option>
+ @endforeach
+ </select>
+ </div>
+ </div>
+ <div class="form-group">
+ <label class="control-label col-md-3">Preferred Batch Queue</label>
+ <div class="col-md-9">
+ <select name="preferredBatchQueue" class="form-control">
+ @foreach( (array)$computeResource->batchQueues as $index => $queue)
+ <option value="{{ $queue->queueName}}" @if( isset( $preferences) ) @if( $preferences->preferredBatchQueue == $queue->queueName) selected @endif @endif>{{ $queue->queueName}}</option>
+ @endforeach
+ </select>
+ </div>
+ </div>
+ <div class="form-group">
+ <label class="control-label col-md-3">Scratch Location</label>
+ <div class="col-md-9">
+ <input type="text" name="scratchLocation" class="form-control" value="@if( isset( $preferences) ){{$preferences->scratchLocation}}@endif" />
+ </div>
+ </div>
+ <div class="form-group">
+ <label class="control-label col-md-3">Allocation Project Number</label>
+ <div class="col-md-9">
+ <input type="text" name="allocationProjectNumber" class="form-control" value="@if( isset( $preferences) ){{$preferences->allocationProjectNumber}}@endif"/>
+ </div>
+ </div>
+ <div class="form-group">
+ <input type="submit" class="form-control btn btn-primary" value="Set preferences" />
+ </div>
+</div>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/a325e292/app/views/partials/interface-block.blade.php
----------------------------------------------------------------------
diff --git a/app/views/partials/interface-block.blade.php b/app/views/partials/interface-block.blade.php
new file mode 100644
index 0000000..3510bd3
--- /dev/null
+++ b/app/views/partials/interface-block.blade.php
@@ -0,0 +1,49 @@
+@if( isset( $interfaceObject) )
+ <input type="hidden" name="app-interface-id" value="{{$interfaceObject->applicationInterfaceId}}"/>
+@endif
+<div class="appInterfaceInputs">
+ <div class="form-group required">
+ <label class="control-label interface-name">Application Name</label>
+ <input type="text" readonly class="form-control" name="applicationName" required value="@if( isset( $interfaceObject) ){{$interfaceObject->applicationName}}@endif"/>
+ </div>
+ <div class="form-group">
+ <label class="control-label">Application Description</label>
+ <input type="text" readonly class="form-control" name="applicationDescription" value="@if( isset( $interfaceObject) ){{ $interfaceObject->applicationDescription}}@endif" />
+ </div>
+ <div class="form-group">
+ <label class="control-label">Application Modules</label>
+ <div class="app-modules">
+ @if( isset( $interfaceObject))
+ @for( $i=0; $i< count( $interfaceObject->applicationModules); $i++ )
+ <div class="input-group">
+ <select name="applicationModules[]" class="app-module-select form-control" readonly>
+ @foreach( $modules as $index => $module)
+ <option value="{{ $module->appModuleId }}" @if( $interfaceObject->applicationModules[$i] == $module->appModuleId) selected @endif>{{ $module->appModuleName}}</option>
+ @endforeach
+ </select>
+ <span class="input-group-addon hide remove-app-module" style="cursor:pointer;">x</span>
+ </div>
+ @endfor
+ @endif
+ </div>
+ <button type="button" class="hide btn btn-default add-app-module">Add Application Module</button>
+ </div>
+ <div class="form-group form-horizontal">
+ @if( isset( $interfaceObject))
+ @foreach( (array)$interfaceObject->applicationInputs as $index => $appInputs)
+ @include( 'partials/interface-input-block', array('dataTypes' => $dataTypes, 'appInputs' => $appInputs) )
+ @endforeach
+ @endif
+ <div class="app-inputs"></div>
+ <button type="button" class=" hide btn btn-default add-input">Add Application Input</button>
+ </div>
+ <div class="form-group form-horizontal">
+ @if( isset( $interfaceObject) )
+ @foreach( (array)$interfaceObject->applicationOutputs as $index => $appOutputs)
+ @include( 'partials/interface-output-block', array('dataTypes' => $dataTypes, 'appOutputs' => $appOutputs) )
+ @endforeach
+ @endif
+ <div class="app-outputs"></div>
+ <button type="button" class="hide btn btn-default add-output">Add Application Output</button>
+ </div>
+</div>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/a325e292/app/views/partials/interface-input-block.blade.php
----------------------------------------------------------------------
diff --git a/app/views/partials/interface-input-block.blade.php b/app/views/partials/interface-input-block.blade.php
new file mode 100644
index 0000000..60fde02
--- /dev/null
+++ b/app/views/partials/interface-input-block.blade.php
@@ -0,0 +1,95 @@
+<div class="well app-input-data-block">
+ <span class="glyphicon glyphicon-trash pull-right remove-input-space"></span>
+ <h4>App Input Fields</h4>
+ <div class="form-group required">
+ <label class="control-label col-md-3">Name</label>
+ <div class="col-md-9">
+ <input type="text" readonly class="form-control" name="inputName[]" required value="@if( isset( $appInputs) ){{$appInputs->name}}@endif"/>
+ </div>
+ </div>
+ <div class="form-group">
+ <label class="control-label col-md-3">Value</label>
+ <div class="col-md-9">
+ <input type="text" readonly class="form-control" name="inputValue[]" value="@if( isset( $appInputs)){{$appInputs->value}}@endif"/>
+ </div>
+ </div>
+ <div class="form-group">
+ <label class="control-label col-md-3">Type</label>
+ <div class="col-md-9">
+ <select class="form-control" name="inputType[]" readonly>
+ @foreach( $dataTypes as $index => $dataType)
+ <option value="{{ $index }}" @if( isset( $appInputs) ) @if( $index == $appInputs->type) selected @endif @endif>{{ $dataType }}</option>
+ @endforeach
+ </select>
+ </div>
+ </div>
+ <div class="form-group">
+ <label class="control-label col-md-3">Application Argument</label>
+ <div class="col-md-9">
+ <input type="text" readonly class="form-control" name="applicationArgumentInput[]" value="@if( isset( $appInputs) ){{$appInputs->applicationArgument }}@endif"/>
+ </div>
+ </div>
+ <div class="form-group">
+ <label class="control-label col-md-3">Standard Input</label>
+ <div class="col-md-9">
+ <select class="form-control" name="standardInput[]" readonly>
+ <option value="0" @if( isset( $appInputs) ) @if( 0 == $appInputs->standardInput) selected @endif @endif>False</option>
+ <option value="1" @if( isset( $appInputs) ) @if( 1 == $appInputs->standardInput) selected @endif @endif>True</option>
+ </select>
+ </div>
+ </div>
+ <div class="form-group">
+ <label class="control-label col-md-3">User Friendly Description</label>
+ <div class="col-md-9">
+ <textarea readonly class="form-control" name="userFriendlyDescription[]">@if( isset( $appInputs) ){{$appInputs->userFriendlyDescription}}@endif</textarea>
+ </div>
+ </div>
+ <div class="form-group col-md-6">
+ <label class="control-label col-md-5">Input Order</label>
+ <div class="col-md-7">
+ <input type="number" readonly class="form-control" name="inputOrder[]" value="@if( isset( $appInputs) ){{$appInputs->inputOrder}}@endif"/>
+ </div>
+ </div>
+ <div class="form-group col-md-7">
+ <label class="control-label col-md-4">Data is Staged?</label>
+ <div class="col-md-8">
+ <select name="dataStaged[]" class="form-control">
+ <option>select</option>
+ <option value="1" @if( isset( $appInputs) ) @if( $appInputs->dataStaged == 1) selected @endif @endif>True</option>
+ <option value="0" @if( isset( $appInputs) ) @if( $appInputs->dataStaged == 0) selected @endif @endif>False</option>
+ </select>
+ </div>
+ <!-- Removed Radio button because it creates problems with multiple inputs
+ <label class="radio-inline">
+ <input type="radio" name="dataStaged[]" @if( isset( $appInputs) ) @if( $appInputs->dataStaged == 1) checked @endif @endif>True
+ </label>
+ <label class="radio-inline">
+ <input type="radio" name="dataStaged[]" @if( isset( $appInputs) ) @if( $appInputs->dataStaged == 0) checked @endif @endif>False
+ </label>
+ -->
+ </div>
+ <div class="form-group col-md-6">
+ <label class="control-label col-md-6">Is the Input required?</label>
+ <div class="col-md-6">
+ <select class="form-control" name="isRequiredInput[]" readonly>
+ <option value="0" @if( isset( $appInputs) ) @if( 0 == $appInputs->isRequired) selected @endif @endif>False</option>
+ <option value="1" @if( isset( $appInputs) ) @if( 1 == $appInputs->isRequired) selected @endif @endif>True</option>
+ </select>
+ </div>
+ </div>
+ <div class="form-group col-md-7">
+ <label class="control-label col-md-6">Required on command line?</label>
+ <div class="col-md-6">
+ <select class="form-control" name="requiredToAddedToCommandLineInput[]" readonly>
+ <option value="0" @if( isset( $appInputs) ) @if( 0 == $appInputs->requiredToAddedToCommandLine) selected @endif @endif>False</option>
+ <option value="1" @if( isset( $appInputs) ) @if( 1 == $appInputs->requiredToAddedToCommandLine) selected @endif @endif>True</option>
+ </select>
+ </div>
+ </div>
+ <div class="form-group">
+ <label class="control-label col-md-3">Meta Data</label>
+ <div class="col-md-9">
+ <textarea readonly class="form-control" name="metaData[]">@if( isset( $appInputs) ){{$appInputs->metaData}}@endif</textarea>
+ </div>
+ </div>
+</div>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/a325e292/app/views/partials/interface-output-block.blade.php
----------------------------------------------------------------------
diff --git a/app/views/partials/interface-output-block.blade.php b/app/views/partials/interface-output-block.blade.php
new file mode 100644
index 0000000..fe78060
--- /dev/null
+++ b/app/views/partials/interface-output-block.blade.php
@@ -0,0 +1,80 @@
+<div class="well">
+ <span class="glyphicon glyphicon-trash pull-right remove-output-space"></span>
+ <h4>App Output Fields</h4>
+ <div class="form-group required">
+ <label class="control-label col-md-3">Name</label>
+ <div class="col-md-9">
+ <input type="text" readonly class="form-control" name="outputName[]" required value="@if( isset( $appOutputs) ){{$appOutputs->name}}@endif"/>
+ </div>
+ </div>
+ <div class="form-group">
+ <label class="control-label col-md-3">Value</label>
+ <div class="col-md-9">
+ <input type="text" readonly class="form-control" name="outputValue[]" value="@if( isset( $appOutputs) ){{$appOutputs->value}}@endif"/>
+ </div>
+ </div>
+ <div class="form-group">
+ <label class="control-label col-md-3">Type</label>
+ <div class="col-md-9">
+ <select class="form-control" name="outputType[]" readonly>
+ @foreach( $dataTypes as $index => $dataType)
+ <option value="{{ $index }}" @if( isset( $appOutputs) ) @if( $index == $appOutputs->type ) selected @endif @endif>{{ $dataType }}</option>
+ @endforeach
+ </select>
+ </div>
+ </div>
+ <div class="form-group">
+ <label class="control-label col-md-3">Application Argument</label>
+ <div class="col-md-9">
+ <input type="text" readonly class="form-control" name="applicationArgumentOutput[]" value="@if( isset( $appOutputs) ){{$appOutputs->applicationArgument }}@endif"/>
+ </div>
+ </div>
+ <div class="form-group">
+ <label class="control-label col-md-3">Data Movement</label>
+ <div class="col-md-9">
+ <select name="dataMovement[]" class="form-control">
+ <option>select</option>
+ <option value="1" @if( isset( $appOutputs) ) @if( $appOutputs->dataMovement == 1) selected @endif @endif>True</option>
+ <option value="0" @if( isset( $appOutputs) ) @if( $appOutputs->dataMovement == 0) selected @endif @endif>False</option>
+ </select>
+ </div>
+ <!--
+ <label class="radio-inline">
+ <input type="radio" name="dataMovement[]" @if( isset( $appOutputs) ) @if( $appOutputs->dataMovement == 1) checked @endif @endif>True
+ </label>
+ <label class="radio-inline">
+ <input type="radio" name="dataMovement[]" @if( isset( $appOutputs) ) @if( $appOutputs->dataMovement == 0) checked @endif @endif>False
+ </label>
+ -->
+ </div>
+ <div class="form-group col-md-6">
+ <label class="control-label col-md-6">Is the Output required?</label>
+ <div class="col-md-6">
+ <select class="form-control" name="isRequiredOutput[]" readonly>
+ <option value="0" @if( isset( $appOutputs) ) @if( 0 == $appOutputs->isRequired) selected @endif @endif>False</option>
+ <option value="1" @if( isset( $appOutputs) ) @if( 1 == $appOutputs->isRequired) selected @endif @endif>True</option>
+ </select>
+ </div>
+ </div>
+ <div class="form-group col-md-7">
+ <label class="control-label col-md-6">Required on command line?</label>
+ <div class="col-md-6">
+ <select class="form-control" name="requiredToAddedToCommandLineOutput[]" readonly>
+ <option value="0" @if( isset( $appOutputs) ) @if( 0 == $appOutputs->requiredToAddedToCommandLine) selected @endif @endif>False</option>
+ <option value="1" @if( isset( $appOutputs) ) @if( 1 == $appOutputs->requiredToAddedToCommandLine) selected @endif @endif>True</option>
+ </select>
+ </div>
+ </div>
+ <div class="form-group">
+ <label class="control-label col-md-3">Location</label>
+ <div class="col-md-9">
+ <input type="text" readonly class="form-control" name="location[]" value="@if( isset( $appOutputs) ){{$appOutputs->location}}@endif"/>
+ </div>
+ </div>
+ <div class="form-group">
+ <label class="control-label col-md-3">Search Query</label>
+ <div class="col-md-9">
+ <input type="text" readonly class="form-control" name="searchQuery[]" value="@if( isset( $appOutputs) ){{$appOutputs->searchQuery}}@endif"/>
+ </div>
+ </div>
+</div>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/a325e292/app/views/partials/module-block.blade.php
----------------------------------------------------------------------
diff --git a/app/views/partials/module-block.blade.php b/app/views/partials/module-block.blade.php
new file mode 100644
index 0000000..b30ad27
--- /dev/null
+++ b/app/views/partials/module-block.blade.php
@@ -0,0 +1,16 @@
+<div id="new-app-module-block">
+
+ <div class="form-group required">
+ <label class="control-label">Application Module Name</label>
+ <input type="text" class="form-control edit-name" name="appModuleName" maxlength="150" required/>
+ </div>
+ <div class="form-group">
+ <label class="control-label">Application Module Version</label>
+ <input type="text" class="form-control edit-version" name="appModuleVersion" maxlength="30" />
+ </div>
+ <div class="form-group">
+ <label class="control-label">Description</label>
+ <textarea class="form-control edit-desc" name="appModuleDescription" maxlength="255"></textarea>
+ </div>
+
+</div>
http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/a325e292/app/views/partials/queue-block.blade.php
----------------------------------------------------------------------
diff --git a/app/views/partials/queue-block.blade.php b/app/views/partials/queue-block.blade.php
new file mode 100644
index 0000000..0238b42
--- /dev/null
+++ b/app/views/partials/queue-block.blade.php
@@ -0,0 +1,24 @@
+<div class="form-group">
+ <label class="control-label">Queue Description</label>
+ <textarea class="form-control" maxlength="255" name="qdesc" placeholder="Queue Description">@if( isset( $queueData) ){{ $queueData->queueDescription }}@endif</textarea>
+</div>
+<div class="form-group">
+ <label class="control-label">Queue Max Run Time<small> (In Minutes) </small></label>
+ <input type="number" min="0" class="form-control" value="@if( isset( $queueData) ){{ $queueData->maxRunTime }}@endif" maxlength="30" name="qmaxruntime" placeholder="Queue Max Run Time"/>
+</div>
+<div class="form-group">
+ <label class="control-label">Queue Max Nodes</label>
+ <input type="number" min="0" class="form-control" value="@if( isset( $queueData) ){{ $queueData->maxNodes }}@endif" maxlength="30" name="qmaxnodes" placeholder="Queue Max Nodes"/>
+</div>
+<div class="form-group">
+ <label class="control-label">Queue Max Processors</label>
+ <input type="number" min="0" class="form-control" value="@if( isset( $queueData) ){{ $queueData->maxProcessors }}@endif" maxlength="30" name="qmaxprocessors" placeholder="Queue Max Processors"/>
+</div>
+<div class="form-group">
+ <label class="control-label">Max Jobs in Queue</label>
+ <input type="number" min="0" class="form-control" value="@if( isset( $queueData) ){{ $queueData->maxJobsInQueue }}@endif" maxlength="30" name="qmaxjobsinqueue" placeholder="Max Jobs In Queue"/>
+</div>
+<div class="form-group">
+ <label class="control-label">Max Memory For Queue( In MB )</label>
+ <input type="number" min="0" class="form-control" value="@if( isset( $queueData) ){{ $queueData->maxMemory }}@endif" maxlength="30" name="qmaxmemoryinqueue" placeholder="Max Memory For Queue"/>
+</div>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/a325e292/app/views/project/create.blade.php
----------------------------------------------------------------------
diff --git a/app/views/project/create.blade.php b/app/views/project/create.blade.php
new file mode 100755
index 0000000..0cc28d3
--- /dev/null
+++ b/app/views/project/create.blade.php
@@ -0,0 +1,42 @@
+@extends('layout.basic')
+
+@section('page-header')
+ @parent
+@stop
+
+@section('content')
+
+<div class="container" style="max-width: 750px">
+
+<h1>Create a new project</h1>
+
+
+<form action="create" method="post" role="form" class="project-creation-form">
+ <div class="form-group required">
+ <label for="project-name" class="control-label">Project Name</label>
+ <input type="text" class="form-control projectName" name="project-name" id="project-name" placeholder="Enter project name" autofocus required>
+ </div>
+
+ <div class="form-group">
+ <label for="project-description">Project Description</label>
+ <textarea class="form-control" name="project-description" id="project-description" placeholder="Optional: Enter a short description of the project"></textarea>
+ </div>
+
+ <input name="save" type="submit" class="btn btn-primary create-project" value="Save">
+ <input name="clear" type="reset" class="btn btn-default" value="Clear">
+
+
+</form>
+
+</div>
+
+@stop
+
+@section('scripts')
+ @parent
+ <script>
+ $(".projectName").blur( function(){
+ $(this).val( $.trim( $(this).val() ) );
+ });
+ </script>
+@stop
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/a325e292/app/views/project/edit.blade.php
----------------------------------------------------------------------
diff --git a/app/views/project/edit.blade.php b/app/views/project/edit.blade.php
new file mode 100755
index 0000000..e2c40b1
--- /dev/null
+++ b/app/views/project/edit.blade.php
@@ -0,0 +1,50 @@
+@extends('layout.basic')
+
+@section('page-header')
+ @parent
+@stop
+
+@section('content')
+
+<div class="container" style="max-width: 750px;">
+
+ <?php if( Session::has("project_edited")) { ?>
+ <div class="alert alert-success">
+ The project has been edited
+ </div>
+ <?php Session::forget("project_edited");
+
+ }
+ ?>
+
+
+ <h1>Edit Project</h1>
+
+ <form action="edit" method="post" role="form">
+ <div class="form-group">
+ <label for="project-name">Project Name</label>
+ <input type="text"
+ class="form-control"
+ name="project-name"
+ id="project-name"
+ value="{{ $project->name }}">
+ </div>
+ <div class="form-group">
+ <label for="project-description">Project Description</label>
+ <textarea class="form-control"
+ name="project-description"
+ id="project-description">{{ $project->description }}</textarea>
+ <input type="hidden" name="projectId" value="{{ Input::get('projId') }}"/>
+ </div>
+
+ <div class="btn-toolbar">
+ <input name="save" type="submit" class="btn" value="Save">
+ </div>
+
+
+ </form>
+
+
+</div>
+
+@stop
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/a325e292/app/views/project/search.blade.php
----------------------------------------------------------------------
diff --git a/app/views/project/search.blade.php b/app/views/project/search.blade.php
new file mode 100755
index 0000000..486fd9d
--- /dev/null
+++ b/app/views/project/search.blade.php
@@ -0,0 +1,103 @@
+
+@extends('layout.basic')
+
+@section('page-header')
+ @parent
+@stop
+
+@section('content')
+
+ <div class="container" style="max-width: 750px;">
+
+ <h1>Search for Projects</h1>
+
+ <form action="{{ URL::to('/') }}/project/search" method="post" class="form-inline" role="form">
+ <div class="form-group">
+ <label for="search-key">Search by</label>
+ <select class="form-control" name="search-key" id="search-key">
+ <option value="project-name">Project Name</option>
+ <option value="project-description">Project description</option>
+ </select>
+ </div>
+
+ <div class="form-group">
+ <label for="search-value">for</label>
+ <input type="search" class="form-control" name="search-value" id="search-value" placeholder="value" required
+ value="<?php if (isset($_POST['search-value'])) echo $_POST['search-value'] ?>">
+ </div>
+
+ <button name="search" type="submit" class="btn btn-primary" value="Search"><span class="glyphicon glyphicon-search"></span> Search</button>
+ <p class="help-block">You can use * as a wildcard character. Tip: search for * alone to retrieve all of your projects.</p>
+ </form>
+
+
+
+
+
+ <?php
+
+ if (isset( $projects))
+ {
+ /**
+ * get results
+ */
+
+ /**
+ * display results
+ */
+ if (sizeof($projects) == 0)
+ {
+ Utilities::print_warning_message('No results found. Please try again.');
+ }
+ else
+ {
+ ?>
+ <div class="table-responsive">
+ <table class="table">
+
+ <tr>
+
+ <th>Name</th>
+ <th>Creation Time</th>
+ <th>Experiments</th>
+
+ </tr>
+ <?php
+
+ foreach ($projects as $project)
+ {
+
+ ?>
+ <tr>
+ <td>
+ <?php echo $project->name; ?>
+ <a href="{{URL::to('/')}}/project/edit?projId=<?php echo $project->projectID; ?>" title="Edit">
+ <span class="glyphicon glyphicon-pencil"></span>
+ </a>
+ </td>
+ <td>
+ <?php echo date('Y-m-d H:i:s', $project->creationTime/1000); ?>
+ </td>
+ <td>
+ <a href="{{URL::to('/')}}/project/summary?projId=<?php echo $project->projectID; ?>">
+ <span class="glyphicon glyphicon-list"></span>
+ </a>
+ <a href="{{URL::to('/')}}/project/summary?projId=<?php echo $project->projectID; ?>"> View</a>
+ </td>
+ </tr>
+ <?php
+
+ }
+
+ echo '</table>';
+ echo '</div>';
+ }
+
+ }
+
+ ?>
+
+
+ </div>
+
+@stop
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/a325e292/app/views/project/summary.blade.php
----------------------------------------------------------------------
diff --git a/app/views/project/summary.blade.php b/app/views/project/summary.blade.php
new file mode 100755
index 0000000..9cb1582
--- /dev/null
+++ b/app/views/project/summary.blade.php
@@ -0,0 +1,121 @@
+@extends('layout.basic')
+
+@section('page-header')
+ @parent
+@stop
+
+@section('content')
+
+<div class="container" style="max-width: 750px;">
+
+
+ <h1>Project Summary</h1>
+
+
+
+ <?php
+
+ $project = Utilities::get_project($_GET['projId']);
+
+
+
+ echo '<div class="panel panel-default">';
+
+ echo '<div class="panel-heading">';
+ echo '<h3>' . $project->name . ' <a href="edit?projId=' .
+ $project->projectID .
+ '" title="Edit"><span class="glyphicon glyphicon-pencil"></span></a></h3>';
+ echo "<p>$project->description</p>";
+ echo '</div>';
+
+ $experiments = Utilities::get_experiments_in_project($project->projectID);
+
+ echo '<div class="table-responsive">';
+ echo '<table class="table">';
+
+ echo '<tr>';
+
+ echo '<th>Name</th>';
+ echo '<th>Application</th>';
+ echo '<th>Time</th>';
+ echo '<th>Status</th>';
+
+ echo '</tr>';
+
+ foreach ($experiments as $experiment)
+ {
+ $expValues = Utilities::get_experiment_values( $experiment, Utilities::get_project($experiment->projectID), true );
+ $applicationInterface = Utilities::get_application_interface($experiment->applicationId);
+
+ echo '<tr>';
+
+ echo '<td>';
+
+
+ switch ($expValues["experimentStatusString"])
+ {
+ case 'SCHEDULED':
+ case 'LAUNCHED':
+ case 'EXECUTING':
+ case 'CANCELING':
+ case 'COMPLETED':
+ echo $experiment->name;
+ break;
+ default:
+ echo $experiment->name .
+ ' <a href="edit?expId=' .
+ $experiment->experimentID .
+ '" title="Edit"><span class="glyphicon glyphicon-pencil"></span></a>';
+ break;
+ }
+
+
+
+ echo '</td>';
+
+ echo "<td>$applicationInterface->applicationName</td>";
+
+
+
+ echo '<td>' . $expValues["experimentTimeOfStateChange"] . '</td>';
+
+
+ switch ($expValues["experimentStatusString"])
+ {
+ case 'CANCELING':
+ case 'CANCELED':
+ case 'UNKNOWN':
+ $textClass = 'text-warning';
+ break;
+ case 'FAILED':
+ $textClass = 'text-danger';
+ break;
+ case 'COMPLETED':
+ $textClass = 'text-success';
+ break;
+ default:
+ $textClass = 'text-info';
+ break;
+ }
+
+
+ echo '<td><a class="' .
+ $textClass .
+ '" href="' . URL::to('/') . '/experiment/summary?expId=' .
+ $experiment->experimentID .
+ '">' .
+ $expValues["experimentStatusString"] .
+ '</a></td>';
+
+ echo '</tr>';
+ }
+
+ echo '</table>';
+ echo '</div>';
+ echo '</div>';
+
+ ?>
+
+
+</div>
+@stop
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/a325e292/app/views/resource/browse.blade.php
----------------------------------------------------------------------
diff --git a/app/views/resource/browse.blade.php b/app/views/resource/browse.blade.php
new file mode 100644
index 0000000..1cca0ad
--- /dev/null
+++ b/app/views/resource/browse.blade.php
@@ -0,0 +1,132 @@
+@extends('layout.basic')
+
+@section('page-header')
+ @parent
+@stop
+
+@section('content')
+
+<div class="container">
+ @if( Session::has("message"))
+ <div class="col-md-12">
+ <span class="alert alert-success">{{ Session::get("message") }}</span>
+ </div>
+ {{ Session::forget("message") }}
+ @endif
+
+ @if ( isset( $allCRs) )
+ @if (sizeof($allCRs) == 0)
+ {{ Utilities::print_warning_message('No Compute Resources exist at the moment. Please register compute resources and then try again.') }}
+ @else
+ <div class="col-md-12">
+ <div class="col-md-6">
+ <h3 style="margin:0;">Existing Compute Resources :</h3>
+ </div>
+ <input type="text" class="pull-right filterinput col-md-6" placeholder="Search by Compure Resource Name"/>
+ <div class="table-responsive">
+ <table class="table">
+
+ <tr>
+
+ <th>Name</th>
+ <th>Id</th>
+ <th>Edit</th>
+ <th>View</th>
+ <th>Delete</th>
+ </tr>
+
+ @foreach ($allCRs as $crId => $crName)
+
+ <tr id="crDetails">
+ <td>{{ $crName }}</td>
+ <td>{{ $crId }}</td>
+ <td><a href="{{URL::to('/')}}/cr/edit?crId={{ $crId }}" title="Edit">
+ <span class="glyphicon glyphicon-pencil"></span>
+ </a>
+ </td>
+ <td>
+ <a class="view-cr" href="#" > <!-- {{URL::to('/')}}/cr/summary?crId={{ $crId }}"> -->
+ <span class="glyphicon glyphicon-list"></span>
+ </a>
+ </td>
+ <td>
+ <a href="#" title="Delete">
+ <span class="glyphicon glyphicon-trash del-cr" data-toggle="modal" data-target="#delete-cr-block" data-delete-cr-name="{{$crName}}" data-deployment-count="{{$connectedDeployments[$crId]}}" data-crid="{{$crId}}" ></span>
+ </a>
+ </td>
+ </tr>
+ @endforeach
+
+ </table>
+ </div>
+
+ @endif
+ @endif
+
+<div class="modal fade" id="delete-cr-block" tabindex="-1" role="dialog" aria-labelledby="add-modal" aria-hidden="true">
+ <div class="modal-dialog">
+
+ <form action="{{URL::to('/')}}/cr/delete-cr" method="POST">
+ <div class="modal-content">
+ <div class="modal-header">
+ <h3 class="text-center">Delete Compute Resource Confirmation</h3>
+ </div>
+ <div class="modal-body">
+ <input type="hidden" class="form-control delete-crId" name="del-crId"/>
+ The Compute Resource, <span class="delete-cr-name"></span> is connected to <span class="deploymentCount">0</span> deployments.
+ Do you really want to delete it? This action cannot be undone.
+ </div>
+ <div class="modal-footer">
+ <div class="form-group">
+ <input type="submit" class="btn btn-danger" value="Delete"/>
+ <input type="button" class="btn btn-default" data-dismiss="modal" value ="Cancel"/>
+ </div>
+ </div>
+ </div>
+
+ </form>
+ </div>
+</div>
+
+</div>
+
+@stop
+@section('scripts')
+ @parent
+ <script type="text/javascript">
+ $(".view-cr").click( function(){
+ alert("The functionality to view a Compute Resource is under construction.");
+ });
+ $('.filterinput').keyup(function() {
+ var value = $(this).val();
+ if (value.length > 0) {
+ $("table tr").each(function(index) {
+ if (index != 0) {
+
+ $row = $(this);
+
+ var id = $row.find("td:first").text();
+ id = $.trim( id);
+ id = id.substr( 0, value.length);
+ if (id == value )
+ {
+ $(this).slideDown();
+ }
+ else {
+ $(this).slideUp();
+ }
+ }
+ });
+ } else {
+ $("table tr").slideDown();
+ }
+ return false;
+ });
+
+ $(".del-cr").click( function(){
+ $(".delete-cr-name").html( "'" + $(this).data("delete-cr-name") + "'");
+ $(".delete-crId").val( $(this).data("crid"));
+ $(".deploymentCount").html( $(this).data("deployment-count"));
+ });
+ </script>
+@stop
\ No newline at end of file