You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by sc...@apache.org on 2015/06/06 10:40:08 UTC
[1/5] airavata-php-gateway git commit: Adding php storm laravel
support
Repository: airavata-php-gateway
Updated Branches:
refs/heads/airavata-php-gateway-0.15-release ee45c04d9 -> 397b70a0d
Adding php storm laravel support
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/d5b1ebb3
Tree: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/tree/d5b1ebb3
Diff: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/diff/d5b1ebb3
Branch: refs/heads/airavata-php-gateway-0.15-release
Commit: d5b1ebb31a589045792bff67ec8c7306f9f4b011
Parents: 2fbd928
Author: Supun Nakandala <sc...@apache.org>
Authored: Fri Jun 5 04:49:45 2015 +0530
Committer: Supun Nakandala <sc...@apache.org>
Committed: Fri Jun 5 04:49:45 2015 +0530
----------------------------------------------------------------------
app/config/app.php | 1 +
composer.json | 5 ++++-
2 files changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/d5b1ebb3/app/config/app.php
----------------------------------------------------------------------
diff --git a/app/config/app.php b/app/config/app.php
index 93d1421..b52c647 100755
--- a/app/config/app.php
+++ b/app/config/app.php
@@ -121,6 +121,7 @@ return array(
'Illuminate\Validation\ValidationServiceProvider',
'Illuminate\View\ViewServiceProvider',
'Illuminate\Workbench\WorkbenchServiceProvider',
+ 'Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider',
'Wsis\WsisServiceProvider',
'Airavata\AiravataServiceProvider',
),
http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/d5b1ebb3/composer.json
----------------------------------------------------------------------
diff --git a/composer.json b/composer.json
index 88a580b..c34f2e9 100755
--- a/composer.json
+++ b/composer.json
@@ -5,7 +5,8 @@
"license": "MIT",
"require": {
"laravel/framework": "4.2.*",
- "apache/thrift": "1.0.*@dev"
+ "apache/thrift": "1.0.*@dev",
+ "barryvdh/laravel-ide-helper": "~2.0"
},
"autoload": {
"classmap": [
@@ -18,10 +19,12 @@
"scripts": {
"post-install-cmd": [
"php artisan clear-compiled",
+ "php artisan ide-helper:generate",
"php artisan optimize"
],
"post-update-cmd": [
"php artisan clear-compiled",
+ "php artisan ide-helper:generate",
"php artisan optimize"
],
"post-create-project-cmd": [
[5/5] airavata-php-gateway git commit: fixing merge conflict
Posted by sc...@apache.org.
fixing merge conflict
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/397b70a0
Tree: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/tree/397b70a0
Diff: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/diff/397b70a0
Branch: refs/heads/airavata-php-gateway-0.15-release
Commit: 397b70a0db26ff65b4ca62a8ab6f567a82a43489
Parents: 7ad8f45 ee45c04
Author: Supun Nakandala <sc...@apache.org>
Authored: Sat Jun 6 14:09:38 2015 +0530
Committer: Supun Nakandala <sc...@apache.org>
Committed: Sat Jun 6 14:09:38 2015 +0530
----------------------------------------------------------------------
app/libraries/AppUtilities.php | 5 --
app/libraries/ExperimentUtilities.php | 20 +++--
app/views/admin/manage-experiments.blade.php | 13 ++-
app/views/experiment/search.blade.php | 96 +++++++++++------------
4 files changed, 66 insertions(+), 68 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/397b70a0/app/libraries/AppUtilities.php
----------------------------------------------------------------------
diff --cc app/libraries/AppUtilities.php
index a789fcf,2b02cea..96e3f30
--- a/app/libraries/AppUtilities.php
+++ b/app/libraries/AppUtilities.php
@@@ -223,11 -223,11 +223,6 @@@ class AppUtilitie
} catch (AiravataSystemException $ase) {
CommonUtilities::print_warning_message('<p>You must create an application module, interface and deployment space before you can create an experiment.
Click <a href="' . URL::to('/') . '/app/module">here</a> to create an application.</p>');
-- /*
- CommonUtilities::print_error_message('<p>There was a problem getting all applications.
- CommonUtilities::print_error_message('<p>There was a problem getting all applications.
-- Please try again later or submit a bug report using the link in the Help menu.</p>' .
-- '<p>Airavata System Exception: ' . $ase->getMessage() . '</p>');
-- */
}
if (count($applications) == 0)
http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/397b70a0/app/libraries/ExperimentUtilities.php
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/397b70a0/app/views/admin/manage-experiments.blade.php
----------------------------------------------------------------------
diff --cc app/views/admin/manage-experiments.blade.php
index c6aae9b,6781e95..05be87d
--- a/app/views/admin/manage-experiments.blade.php
+++ b/app/views/admin/manage-experiments.blade.php
@@@ -410,6 -408,7 +408,10 @@@ to be uncommented when actually in use
$(".add-tenant").slideDown();
});
++<<<<<<< HEAD
++=======
+
++>>>>>>> ee45c04d94e2cc3daec69dfeaf2651c353df2d64
$('.tree li:has(ul)').addClass('parent_li').find(' > span').attr('title', 'Collapse this branch');
$('.tree li.parent_li > span').on('click', function (e) {
var children = $(this).parent('li.parent_li').find(' > ul > li');
@@@ -423,8 -422,8 +425,13 @@@
e.stopPropagation();
});
++<<<<<<< HEAD
+ $(".get-experiment").click(function () {
+ $(".loading-img").removeClass("hide");
++=======
+ $('.get-experiment').on('click', function (e) {
+ $('.loading-img').removeClass('hide');
++>>>>>>> ee45c04d94e2cc3daec69dfeaf2651c353df2d64
$.ajax({
url: 'experiment/summary?expId=' + $(".experimentId").val(),
type: 'get',
[3/5] airavata-php-gateway git commit: the config files should not be
in repo, instead committing a template
Posted by sc...@apache.org.
the config files should not be in repo, instead committing a template
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/a88115a6
Tree: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/tree/a88115a6
Diff: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/diff/a88115a6
Branch: refs/heads/airavata-php-gateway-0.15-release
Commit: a88115a63110be4e9d969c41dd6b1cfbd82dfde4
Parents: f3d7e2b
Author: Suresh Marru <sm...@apache.org>
Authored: Fri Jun 5 22:22:06 2015 -0400
Committer: Suresh Marru <sm...@apache.org>
Committed: Fri Jun 5 22:22:06 2015 -0400
----------------------------------------------------------------------
app/config/pga_config.php | 135 --------------------------------
app/config/pga_config.php.template | 135 ++++++++++++++++++++++++++++++++
2 files changed, 135 insertions(+), 135 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/a88115a6/app/config/pga_config.php
----------------------------------------------------------------------
diff --git a/app/config/pga_config.php b/app/config/pga_config.php
deleted file mode 100644
index 27ec861..0000000
--- a/app/config/pga_config.php
+++ /dev/null
@@ -1,135 +0,0 @@
-<?php
-return array(
- /**
- * *****************************************************************
- * These are WSO2 Identity Server Related Configurations
- * *****************************************************************
- */
-
- 'wsis' => [
-
- /**
- * Admin Role Name
- */
- 'admin-role-name' => 'admin',
-
- /**
- * Gateway user role
- */
- 'user-role-name' => 'Internal/everyone',
-
- /**
- * Tenant admin's username
- */
- 'admin-username' => 'test@testphprg.scigap.org',
-
- /**
- * Tenant admin's password
- */
- 'admin-password' => 'testadmin@scigap.org',
-
- /**
- * Identity server domain
- */
- 'server' => 'idp.scigap.org',
-
- /**
- * Identity server web services endpoint
- */
- 'service-url' => 'https://idp.scigap.org:7443/services/',
-
- /**
- * Gateway domain name
- */
- 'gateway-id' => 'default',
-
- /**
- * Path to the server certificate file
- */
- 'cafile-path' => app_path() . '/resources/security/idp_scigap_org.pem',
-
- /**
- * Enable HTTPS server verification
- */
- 'verify-peer' => true,
-
- /**
- * Allow self signed server certificates
- */
- 'allow-self-signed-cert' => false
- ],
-
-
- /**
- * *****************************************************************
- * These are Airavata Related Configurations
- * *****************************************************************
- */
- 'airavata' => [
- /**
- * Airavata API server location
- */
- 'airavata-server' => 'gw111.iu.xsede.org',
-
- /**
- * Airavata API server port
- */
- 'airavata-port' => '9930',
-
- /**
- * Airavata API server thrift communication timeout
- */
- 'airavata-timeout' => '1000000',
-
- /**
- * PGA Gateway ID
- */
- 'gateway-id' => 'default',
-
- /**
- * Maximum size of a file which is allowed to upload to the server
- */
- 'server-allowed-file-size' => 64,
-
- /**
- * directory in the web server where experiment data is staged. This path should be a relative path from app root
- */
- 'experiment-data-root' => '/../experimentData/',
-
- /**
- * Advanced experiments options
- */
- 'advanced-experiment-options' => '',
-
- /**
- * Credentials Store Token
- */
- 'credential-store-token' => 'bdc612fe-401e-4684-88e9-317f99409c45',
-
- /**
- * Default queue name
- */
- 'queue-name' => 'long',
-
- /**
- * Default node count
- */
- 'node-count' => '1',
-
- /**
- * Default total core count
- */
- 'total-cpu-count' => '4',
-
- /**
- * Default wall time limit
- */
- 'wall-time-limit' => '30',
-
- /**
- * Life time of app catalog data cache in minutes
- */
- 'app-catalog-cache-duration' => 5
- ]
-
-);
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/a88115a6/app/config/pga_config.php.template
----------------------------------------------------------------------
diff --git a/app/config/pga_config.php.template b/app/config/pga_config.php.template
new file mode 100644
index 0000000..27ec861
--- /dev/null
+++ b/app/config/pga_config.php.template
@@ -0,0 +1,135 @@
+<?php
+return array(
+ /**
+ * *****************************************************************
+ * These are WSO2 Identity Server Related Configurations
+ * *****************************************************************
+ */
+
+ 'wsis' => [
+
+ /**
+ * Admin Role Name
+ */
+ 'admin-role-name' => 'admin',
+
+ /**
+ * Gateway user role
+ */
+ 'user-role-name' => 'Internal/everyone',
+
+ /**
+ * Tenant admin's username
+ */
+ 'admin-username' => 'test@testphprg.scigap.org',
+
+ /**
+ * Tenant admin's password
+ */
+ 'admin-password' => 'testadmin@scigap.org',
+
+ /**
+ * Identity server domain
+ */
+ 'server' => 'idp.scigap.org',
+
+ /**
+ * Identity server web services endpoint
+ */
+ 'service-url' => 'https://idp.scigap.org:7443/services/',
+
+ /**
+ * Gateway domain name
+ */
+ 'gateway-id' => 'default',
+
+ /**
+ * Path to the server certificate file
+ */
+ 'cafile-path' => app_path() . '/resources/security/idp_scigap_org.pem',
+
+ /**
+ * Enable HTTPS server verification
+ */
+ 'verify-peer' => true,
+
+ /**
+ * Allow self signed server certificates
+ */
+ 'allow-self-signed-cert' => false
+ ],
+
+
+ /**
+ * *****************************************************************
+ * These are Airavata Related Configurations
+ * *****************************************************************
+ */
+ 'airavata' => [
+ /**
+ * Airavata API server location
+ */
+ 'airavata-server' => 'gw111.iu.xsede.org',
+
+ /**
+ * Airavata API server port
+ */
+ 'airavata-port' => '9930',
+
+ /**
+ * Airavata API server thrift communication timeout
+ */
+ 'airavata-timeout' => '1000000',
+
+ /**
+ * PGA Gateway ID
+ */
+ 'gateway-id' => 'default',
+
+ /**
+ * Maximum size of a file which is allowed to upload to the server
+ */
+ 'server-allowed-file-size' => 64,
+
+ /**
+ * directory in the web server where experiment data is staged. This path should be a relative path from app root
+ */
+ 'experiment-data-root' => '/../experimentData/',
+
+ /**
+ * Advanced experiments options
+ */
+ 'advanced-experiment-options' => '',
+
+ /**
+ * Credentials Store Token
+ */
+ 'credential-store-token' => 'bdc612fe-401e-4684-88e9-317f99409c45',
+
+ /**
+ * Default queue name
+ */
+ 'queue-name' => 'long',
+
+ /**
+ * Default node count
+ */
+ 'node-count' => '1',
+
+ /**
+ * Default total core count
+ */
+ 'total-cpu-count' => '4',
+
+ /**
+ * Default wall time limit
+ */
+ 'wall-time-limit' => '30',
+
+ /**
+ * Life time of app catalog data cache in minutes
+ */
+ 'app-catalog-cache-duration' => 5
+ ]
+
+);
\ No newline at end of file
[4/5] airavata-php-gateway git commit: Fixing experiment info not
shown in Admin DashBoard
Posted by sc...@apache.org.
Fixing experiment info not shown in Admin DashBoard
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/7ad8f45c
Tree: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/tree/7ad8f45c
Diff: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/diff/7ad8f45c
Branch: refs/heads/airavata-php-gateway-0.15-release
Commit: 7ad8f45cd98c7799aa2f2e099d3a6436a8ade316
Parents: a88115a
Author: Supun Nakandala <sc...@apache.org>
Authored: Sat Jun 6 14:05:27 2015 +0530
Committer: Supun Nakandala <sc...@apache.org>
Committed: Sat Jun 6 14:05:27 2015 +0530
----------------------------------------------------------------------
app/controllers/ExperimentController.php | 6 +-
app/libraries/AppUtilities.php | 2 +-
app/libraries/ExperimentUtilities.php | 2 +-
app/views/account/create.blade.php | 4 +-
app/views/account/login.blade.php | 2 +-
app/views/admin/manage-experiments.blade.php | 109 +++++++++++-----------
app/views/resource/browse.blade.php | 3 +-
7 files changed, 62 insertions(+), 66 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/7ad8f45c/app/controllers/ExperimentController.php
----------------------------------------------------------------------
diff --git a/app/controllers/ExperimentController.php b/app/controllers/ExperimentController.php
index e5f0baa..8b568db 100755
--- a/app/controllers/ExperimentController.php
+++ b/app/controllers/ExperimentController.php
@@ -66,7 +66,7 @@ class ExperimentController extends BaseController
/* Not required.
else
{
- Utilities::print_success_message("<p>Experiment {$_POST['experiment-name']} created!</p>" .
+ CommonUtilities::print_success_message("<p>Experiment {$_POST['experiment-name']} created!</p>" .
'<p>You will be redirected to the summary page shortly, or you can
<a href=' . URL::to('/') . '"/experiment/summary?expId=' . $expId . '">go directly</a> to experiment summary page.</p>');
@@ -137,9 +137,9 @@ class ExperimentController extends BaseController
$expVal["jobState"] = ExperimentUtilities::get_job_status($experiment);
/*if (isset($_POST['save']))
{
- $updatedExperiment = Utilities::apply_changes_to_experiment($experiment);
+ $updatedExperiment = CommonUtilities::apply_changes_to_experiment($experiment);
- Utilities::update_experiment($experiment->experimentID, $updatedExperiment);
+ CommonUtilities::update_experiment($experiment->experimentID, $updatedExperiment);
}*/
if (isset($_POST['launch'])) {
ExperimentUtilities::launch_experiment($experiment->experimentID);
http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/7ad8f45c/app/libraries/AppUtilities.php
----------------------------------------------------------------------
diff --git a/app/libraries/AppUtilities.php b/app/libraries/AppUtilities.php
index 0eb9e2a..a789fcf 100644
--- a/app/libraries/AppUtilities.php
+++ b/app/libraries/AppUtilities.php
@@ -224,7 +224,7 @@ class AppUtilities
CommonUtilities::print_warning_message('<p>You must create an application module, interface and deployment space before you can create an experiment.
Click <a href="' . URL::to('/') . '/app/module">here</a> to create an application.</p>');
/*
- Utilities::print_error_message('<p>There was a problem getting all applications.
+ CommonUtilities::print_error_message('<p>There was a problem getting all applications.
Please try again later or submit a bug report using the link in the Help menu.</p>' .
'<p>Airavata System Exception: ' . $ase->getMessage() . '</p>');
*/
http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/7ad8f45c/app/libraries/ExperimentUtilities.php
----------------------------------------------------------------------
diff --git a/app/libraries/ExperimentUtilities.php b/app/libraries/ExperimentUtilities.php
index 9f6c6b9..2561168 100644
--- a/app/libraries/ExperimentUtilities.php
+++ b/app/libraries/ExperimentUtilities.php
@@ -556,7 +556,7 @@ class ExperimentUtilities
if ($expId) {
/*
- Utilities::print_success_message("Experiment {$_POST['experiment-name']} created!" .
+ CommonUtilities::print_success_message("Experiment {$_POST['experiment-name']} created!" .
' <a href="experiment_summary.php?expId=' . $expId . '">Go to experiment summary page</a>');
*/
} else {
http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/7ad8f45c/app/views/account/create.blade.php
----------------------------------------------------------------------
diff --git a/app/views/account/create.blade.php b/app/views/account/create.blade.php
index 7d92a7f..0709d2e 100755
--- a/app/views/account/create.blade.php
+++ b/app/views/account/create.blade.php
@@ -17,7 +17,7 @@
@if ($errors->has())
@foreach ($errors->all() as $error)
- {{ Utilities::print_error_message($error) }}
+ {{ CommonUtilities::print_error_message($error) }}
@endforeach
@endif
@@ -25,7 +25,7 @@
<form action="create" method="post" role="form">
@if( Session::has('username_exists'))
- {{ Utilities::print_error_message('The username you entered is already in use. Please select another.') }}
+ {{ CommonUtilities::print_error_message('The username you entered is already in use. Please select another.') }}
@endif
<?php
Session::forget("username_exists");
http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/7ad8f45c/app/views/account/login.blade.php
----------------------------------------------------------------------
diff --git a/app/views/account/login.blade.php b/app/views/account/login.blade.php
index 2d6d58e..7ef30cc 100755
--- a/app/views/account/login.blade.php
+++ b/app/views/account/login.blade.php
@@ -18,7 +18,7 @@
<form action="login" method="post" role="form">
@if( Session::has("invalid-credentials") )
- {{ Utilities::print_error_message('Invalid username or password. Please try again.') }}
+ {{ CommonUtilities::print_error_message('Invalid username or password. Please try again.') }}
@endif
<?php
Session::forget("invalid-credentials");
http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/7ad8f45c/app/views/admin/manage-experiments.blade.php
----------------------------------------------------------------------
diff --git a/app/views/admin/manage-experiments.blade.php b/app/views/admin/manage-experiments.blade.php
index eb97fba..c6aae9b 100644
--- a/app/views/admin/manage-experiments.blade.php
+++ b/app/views/admin/manage-experiments.blade.php
@@ -394,8 +394,6 @@ to be uncommented when actually in use.
-->
<!-- Flot Charts JavaScript -->
-<!--[if lte IE 8]>
-<script src="js/excanvas.min.js')}}<![endif]-->
{{ HTML::script('js/flot/jquery.flot.js')}}
{{ HTML::script('js/flot/jquery.flot.tooltip.min.js')}}
{{ HTML::script('js/flot/jquery.flot.resize.js')}}
@@ -412,67 +410,64 @@ to be uncommented when actually in use.
$(".add-tenant").slideDown();
});
- $(function () {
- $('.tree li:has(ul)').addClass('parent_li').find(' > span').attr('title', 'Collapse this branch');
- $('.tree li.parent_li > span').on('click', function (e) {
- var children = $(this).parent('li.parent_li').find(' > ul > li');
- if (children.is(":visible")) {
- children.hide('fast');
- $(this).attr('title', 'Expand this branch').find(' > i').addClass('icon-plus-sign').removeClass('icon-minus-sign');
- } else {
- children.show('fast');
- $(this).attr('title', 'Collapse this branch').find(' > i').addClass('icon-minus-sign').removeClass('icon-plus-sign');
- }
- e.stopPropagation();
- });
-
- $(".get-experiment").click(function () {
- $(".loading-img").removeClass("hide");
- $.ajax({
- url: 'experiment/summary?expId=' + $(".experimentId").val(),
- type: 'get',
- success: function (data) {
- $(".experiment-info").html(data);
-
- }
- }).complete(function () {
- $(".loading-img").addClass("hide");
- });
- });
-
- //Experiment stages are under development.
- $(".tree").parent().addClass("hide");
+ $('.tree li:has(ul)').addClass('parent_li').find(' > span').attr('title', 'Collapse this branch');
+ $('.tree li.parent_li > span').on('click', function (e) {
+ var children = $(this).parent('li.parent_li').find(' > ul > li');
+ if (children.is(":visible")) {
+ children.hide('fast');
+ $(this).attr('title', 'Expand this branch').find(' > i').addClass('icon-plus-sign').removeClass('icon-minus-sign');
+ } else {
+ children.show('fast');
+ $(this).attr('title', 'Collapse this branch').find(' > i').addClass('icon-minus-sign').removeClass('icon-plus-sign');
+ }
+ e.stopPropagation();
+ });
- /* making datetimepicker work for exp search */
+ $(".get-experiment").click(function () {
+ $(".loading-img").removeClass("hide");
+ $.ajax({
+ url: 'experiment/summary?expId=' + $(".experimentId").val(),
+ type: 'get',
+ success: function (data) {
+ $(".experiment-info").html(data);
- $('#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);
+ }
+ }).complete(function () {
+ $(".loading-img").addClass("hide");
});
+ });
- /* 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");
+ //Experiment stages are under development.
+ $(".tree").parent().addClass("hide");
- }
- else {
- $(".search-text-block").removeClass("hide");
- $(".select-dates").addClass("hide");
- $("#search-value").attr("required");
- }
- });
+ /* 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");
+ }
});
</script>
@stop
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/7ad8f45c/app/views/resource/browse.blade.php
----------------------------------------------------------------------
diff --git a/app/views/resource/browse.blade.php b/app/views/resource/browse.blade.php
index ac78bfa..d50e359 100644
--- a/app/views/resource/browse.blade.php
+++ b/app/views/resource/browse.blade.php
@@ -16,7 +16,8 @@
@if ( isset( $allCRs) )
@if (sizeof($allCRs) == 0)
- {{ Utilities::print_warning_message('No Compute Resources are registered. Please use "Register Compute Resource" to
+ {{ CommonUtilities::print_warning_message('No Compute Resources are registered. Please use "Register Compute
+ Resource" to
register a new resources.') }}
@else
<div class="col-md-12">
[2/5] airavata-php-gateway git commit: Caching App Catalog Data
improve PGA performance
Posted by sc...@apache.org.
Caching App Catalog Data improve PGA performance
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/f3d7e2b4
Tree: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/tree/f3d7e2b4
Diff: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/diff/f3d7e2b4
Branch: refs/heads/airavata-php-gateway-0.15-release
Commit: f3d7e2b45e7936babbb35ace919e4c0e5a3c2905
Parents: d5b1ebb
Author: Supun Nakandala <sc...@apache.org>
Authored: Sat Jun 6 00:34:01 2015 +0530
Committer: Supun Nakandala <sc...@apache.org>
Committed: Sat Jun 6 00:34:01 2015 +0530
----------------------------------------------------------------------
app/config/cache.php | 24 +++++++++++-----------
app/config/pga_config.php | 7 ++++++-
app/controllers/ExperimentController.php | 8 ++++++--
app/libraries/AppUtilities.php | 11 +++++++---
app/libraries/CRUtilities.php | 10 ++++++---
app/libraries/ExperimentUtilities.php | 29 ++++++++++++++++++---------
6 files changed, 58 insertions(+), 31 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/f3d7e2b4/app/config/cache.php
----------------------------------------------------------------------
diff --git a/app/config/cache.php b/app/config/cache.php
index 34e5bf0..2733233 100755
--- a/app/config/cache.php
+++ b/app/config/cache.php
@@ -15,18 +15,18 @@ return array(
|
*/
- 'driver' => 'apc',
-
- /*
- |--------------------------------------------------------------------------
- | File Cache Location
- |--------------------------------------------------------------------------
- |
- | When using the "file" cache driver, we need a location where the cache
- | files may be stored. A sensible default has been specified, but you
- | are free to change it to any other place on disk that you desire.
- |
- */
+ 'driver' => 'file',
+
+ /*
+ |--------------------------------------------------------------------------
+ | File Cache Location
+ |--------------------------------------------------------------------------
+ |
+ | When using the "file" cache driver, we need a location where the cache
+ | files may be stored. A sensible default has been specified, but you
+ | are free to change it to any other place on disk that you desire.
+ |
+ */
'path' => storage_path().'/cache',
http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/f3d7e2b4/app/config/pga_config.php
----------------------------------------------------------------------
diff --git a/app/config/pga_config.php b/app/config/pga_config.php
index 56f5fcb..27ec861 100644
--- a/app/config/pga_config.php
+++ b/app/config/pga_config.php
@@ -124,7 +124,12 @@ return array(
/**
* Default wall time limit
*/
- 'wall-time-limit' => '30'
+ 'wall-time-limit' => '30',
+
+ /**
+ * Life time of app catalog data cache in minutes
+ */
+ 'app-catalog-cache-duration' => 5
]
);
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/f3d7e2b4/app/controllers/ExperimentController.php
----------------------------------------------------------------------
diff --git a/app/controllers/ExperimentController.php b/app/controllers/ExperimentController.php
index 60561de..e5f0baa 100755
--- a/app/controllers/ExperimentController.php
+++ b/app/controllers/ExperimentController.php
@@ -7,7 +7,7 @@ class ExperimentController extends BaseController
* Limit used in fetching paginated results
* @var int
*/
- var $limit = 10;
+ var $limit = 20;
/**
* Instantiate a new ExperimentController Instance
@@ -82,6 +82,7 @@ class ExperimentController extends BaseController
if ($experiment != null) {
$project = ProjectUtilities::get_project($experiment->projectID);
$expVal = ExperimentUtilities::get_experiment_values($experiment, $project);
+ $expVal["jobState"] = ExperimentUtilities::get_job_status($experiment);
$jobDetails = ExperimentUtilities::get_job_details($experiment->experimentID);
$transferDetails = ExperimentUtilities::get_transfer_details($experiment->experimentID);
//var_dump( $jobDetails); exit;
@@ -133,6 +134,7 @@ class ExperimentController extends BaseController
$project = ProjectUtilities::get_project($experiment->projectID);
$expVal = ExperimentUtilities::get_experiment_values($experiment, $project);
+ $expVal["jobState"] = ExperimentUtilities::get_job_status($experiment);
/*if (isset($_POST['save']))
{
$updatedExperiment = Utilities::apply_changes_to_experiment($experiment);
@@ -148,6 +150,7 @@ class ExperimentController extends BaseController
$project = ProjectUtilities::get_project($experiment->projectID);
$expVal = ExperimentUtilities::get_experiment_values($experiment, $project);
+ $expVal["jobState"] = ExperimentUtilities::get_job_status($experiment);
return Redirect::to('experiment/edit?expId=' . $experiment->experimentID);
@@ -170,6 +173,7 @@ class ExperimentController extends BaseController
$project = ProjectUtilities::get_project($experiment->projectID);
$expVal = ExperimentUtilities::get_experiment_values($experiment, $project);
+ $expVal["jobState"] = ExperimentUtilities::get_job_status($experiment);
//var_dump( $expVal); exit;
$computeResources = CRUtilities::create_compute_resources_select($experiment->applicationId, $expVal['scheduling']->resourceHostId);
@@ -243,7 +247,7 @@ class ExperimentController extends BaseController
$expContainer = ExperimentUtilities::get_expsearch_results_with_pagination(Input::all(), $this->limit,
($pageNo - 1) * $this->limit);
- $experimentStates = CommonUtilities::getExpStates();
+ $experimentStates = ExperimentUtilities::getExpStates();
return View::make('experiment/search', array(
'input' => Input::all(),
'pageNo' => $pageNo,
http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/f3d7e2b4/app/libraries/AppUtilities.php
----------------------------------------------------------------------
diff --git a/app/libraries/AppUtilities.php b/app/libraries/AppUtilities.php
index 5ceb44a..0eb9e2a 100644
--- a/app/libraries/AppUtilities.php
+++ b/app/libraries/AppUtilities.php
@@ -248,7 +248,14 @@ class AppUtilities
$applicationInterface = null;
try {
- $applicationInterface = Airavata::getApplicationInterface($id);
+ if (Cache::has('APP-' . $id)) {
+ return Cache::get('APP-' . $id);
+ } else {
+ $applicationInterface = Airavata::getApplicationInterface($id);
+ Cache::put('APP-' . $id, $applicationInterface, Config::get('pga_config.airavata')['app-catalog-cache-duration']);
+ return $applicationInterface;
+ }
+
} catch (InvalidRequestException $ire) {
CommonUtilities::print_error_message('<p>There was a problem getting the application interface.
Please try again later or submit a bug report using the link in the Help menu.</p>' .
@@ -262,8 +269,6 @@ class AppUtilities
Please try again later or submit a bug report using the link in the Help menu.</p>' .
'<p>Airavata System Exception: ' . $ase->getMessage() . '</p>');
}
-
- return $applicationInterface;
}
/**
http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/f3d7e2b4/app/libraries/CRUtilities.php
----------------------------------------------------------------------
diff --git a/app/libraries/CRUtilities.php b/app/libraries/CRUtilities.php
index 688c1de..9e3069d 100755
--- a/app/libraries/CRUtilities.php
+++ b/app/libraries/CRUtilities.php
@@ -420,7 +420,13 @@ class CRUtilities
$computeResource = null;
try {
- $computeResource = Airavata::getComputeResource($id);
+ if (Cache::has('CR-' . $id)) {
+ return Cache::get('CR-' . $id);
+ } else {
+ $computeResource = Airavata::getComputeResource($id);
+ Cache::put('CR-' . $id, $computeResource, Config::get('pga_config.airavata')['app-catalog-cache-duration']);
+ return $computeResource;
+ }
} catch (InvalidRequestException $ire) {
CommonUtilities::print_error_message('<p>There was a problem getting the compute resource.
Please try again later or submit a bug report using the link in the Help menu.</p>' .
@@ -434,8 +440,6 @@ class CRUtilities
Please try again later or submit a bug report using the link in the Help menu.</p>' .
'<p>Airavata System Exception: ' . $ase->getMessage() . '</p>');
}
-
- return $computeResource;
}
http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/f3d7e2b4/app/libraries/ExperimentUtilities.php
----------------------------------------------------------------------
diff --git a/app/libraries/ExperimentUtilities.php b/app/libraries/ExperimentUtilities.php
index 6a5f0b4..9f6c6b9 100644
--- a/app/libraries/ExperimentUtilities.php
+++ b/app/libraries/ExperimentUtilities.php
@@ -620,16 +620,6 @@ class ExperimentUtilities
$expVal["experimentTimeOfStateChange"] = $experimentStatus->timeOfStateChange / 1000; // divide by 1000 since timeOfStateChange is in ms
$expVal["experimentCreationTime"] = $experiment->creationTime / 1000; // divide by 1000 since creationTime is in ms
}
- $jobStatus = Airavata::getJobStatuses($experiment->experimentID);
-
- if ($jobStatus) {
- $jobName = array_keys($jobStatus);
- $jobState = JobState::$__names[$jobStatus[$jobName[0]]->jobState];
- } else {
- $jobState = null;
- }
-
- $expVal["jobState"] = $jobState;
if (!$forSearch) {
$userConfigData = $experiment->userConfigurationData;
@@ -670,6 +660,25 @@ class ExperimentUtilities
}
+ /**
+ * Method to get the job status of an experiment
+ * @param $experiment
+ * @return null
+ */
+ public static function get_job_status($experiment)
+ {
+ $jobStatus = Airavata::getJobStatuses($experiment->experimentID);
+
+ if ($jobStatus) {
+ $jobName = array_keys($jobStatus);
+ $jobState = JobState::$__names[$jobStatus[$jobName[0]]->jobState];
+ } else {
+ $jobState = null;
+ }
+
+ return $jobState;
+ }
+
/**
* Create options for the search key select input