Return-Path: X-Original-To: apmail-airavata-commits-archive@www.apache.org Delivered-To: apmail-airavata-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4E01418881 for ; Tue, 14 Jul 2015 16:38:06 +0000 (UTC) Received: (qmail 92475 invoked by uid 500); 14 Jul 2015 16:38:06 -0000 Delivered-To: apmail-airavata-commits-archive@airavata.apache.org Received: (qmail 92426 invoked by uid 500); 14 Jul 2015 16:38:06 -0000 Mailing-List: contact commits-help@airavata.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@airavata.apache.org Delivered-To: mailing list commits@airavata.apache.org Received: (qmail 92413 invoked by uid 99); 14 Jul 2015 16:38:06 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Jul 2015 16:38:06 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 1B7FEE02A2; Tue, 14 Jul 2015 16:38:06 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: smarru@apache.org To: commits@airavata.apache.org Date: Tue, 14 Jul 2015 16:38:06 -0000 Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: [01/40] airavata-php-gateway git commit: Manually reverting Airavata-1703 to be compatible with Airavata 0.15 release branch Repository: airavata-php-gateway Updated Branches: refs/heads/0.15-release-branch [created] 309371195 refs/heads/airavata-php-gateway-0.15-release [deleted] 309371195 Manually reverting Airavata-1703 to be compatible with Airavata 0.15 release branch 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/b2ca8f73 Tree: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/tree/b2ca8f73 Diff: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/diff/b2ca8f73 Branch: refs/heads/0.15-release-branch Commit: b2ca8f73d84677f2f272d00adb5274e4790b6333 Parents: 2fbd928 Author: Supun Nakandala Authored: Fri Jun 5 04:02:34 2015 +0530 Committer: Supun Nakandala Committed: Fri Jun 5 04:02:34 2015 +0530 ---------------------------------------------------------------------- app/controllers/ExperimentController.php | 2 +- app/libraries/ExperimentUtilities.php | 30 ++++----- app/views/experiment/search.blade.php | 96 +++++++++++++-------------- 3 files changed, 62 insertions(+), 66 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/b2ca8f73/app/controllers/ExperimentController.php ---------------------------------------------------------------------- diff --git a/app/controllers/ExperimentController.php b/app/controllers/ExperimentController.php index 60561de..9639716 100755 --- a/app/controllers/ExperimentController.php +++ b/app/controllers/ExperimentController.php @@ -243,7 +243,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/b2ca8f73/app/libraries/ExperimentUtilities.php ---------------------------------------------------------------------- diff --git a/app/libraries/ExperimentUtilities.php b/app/libraries/ExperimentUtilities.php index 6a5f0b4..ad41762 100644 --- a/app/libraries/ExperimentUtilities.php +++ b/app/libraries/ExperimentUtilities.php @@ -702,44 +702,42 @@ class ExperimentUtilities $experiments = array(); try { - $filters = array(); - if ($inputs["status-type"] != "ALL") { - $filters[\Airavata\Model\Workspace\Experiment\ExperimentSearchFields::STATUS] = $inputs["status-type"]; - } switch ($inputs["search-key"]) { case 'experiment-name': - $filters[\Airavata\Model\Workspace\Experiment\ExperimentSearchFields::EXPERIMENT_NAME] = $inputs["search-value"]; + $experiments = Airavata::searchExperimentsByNameWithPagination( + Session::get('gateway_id'), Session::get('username'), $inputs["search-value"], $limit, $offset); break; case 'experiment-description': - $filters[\Airavata\Model\Workspace\Experiment\ExperimentSearchFields::EXPERIMENT_DESC] = $inputs["search-value"]; + $experiments = Airavata::searchExperimentsByDescWithPagination( + Session::get('gateway_id'), Session::get('username'), $inputs["search-value"], $limit, $offset); break; case 'application': - $filters[\Airavata\Model\Workspace\Experiment\ExperimentSearchFields::APPLICATION_ID] = $inputs["search-value"]; + $experiments = Airavata::searchExperimentsByApplicationWithPagination( + Session::get('gateway_id'), Session::get('username'), $inputs["search-value"], $limit, $offset); break; case 'creation-time': - $filters[\Airavata\Model\Workspace\Experiment\ExperimentSearchFields::FROM_DATE] = strtotime($inputs["from-date"]) * 1000; - $filters[\Airavata\Model\Workspace\Experiment\ExperimentSearchFields::TO_DATE] = strtotime($inputs["to-date"]) * 1000; + $experiments = Airavata::searchExperimentsByCreationTimeWithPagination( + Session::get('gateway_id'), Session::get('username'), strtotime($inputs["from-date"]) * 1000, + strtotime($inputs["to-date"]) * 1000, $limit, $offset); break; case '': } - $experiments = Airavata::searchExperiments( - Session::get('gateway_id'), Session::get('username'), $filters, $limit, $offset); } catch (InvalidRequestException $ire) { - CommonUtilities::print_error_message('InvalidRequestException!

' . $ire->getMessage()); + Utilities::print_error_message('InvalidRequestException!

' . $ire->getMessage()); } catch (AiravataClientException $ace) { - CommonUtilities::print_error_message('AiravataClientException!

' . $ace->getMessage()); + Utilities::print_error_message('AiravataClientException!

' . $ace->getMessage()); } catch (AiravataSystemException $ase) { if ($ase->airavataErrorType == 2) // 2 = INTERNAL_ERROR { - CommonUtilities::print_info_message('

You have not created any experiments yet, so no results will be returned!

+ Utilities::print_info_message('

You have not created any experiments yet, so no results will be returned!

Click here to create an experiment, or here to create a new project.

'); } else { - CommonUtilities::print_error_message('There was a problem with Airavata. Please try again later or report a bug using the link in the Help menu.'); + Utilities::print_error_message('There was a problem with Airavata. Please try again later or report a bug using the link in the Help menu.'); //print_error_message('AiravataSystemException!

' . $ase->airavataErrorType . ': ' . $ase->getMessage()); } } catch (TTransportException $tte) { - CommonUtilities::print_error_message('TTransportException!

' . $tte->getMessage()); + Utilities::print_error_message('TTransportException!

' . $tte->getMessage()); } //get values of all experiments http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/b2ca8f73/app/views/experiment/search.blade.php ---------------------------------------------------------------------- diff --git a/app/views/experiment/search.blade.php b/app/views/experiment/search.blade.php index 926268e..0acca01 100755 --- a/app/views/experiment/search.blade.php +++ b/app/views/experiment/search.blade.php @@ -34,18 +34,19 @@ value=""> - + + + $state) { + // if (isset($input) && $state == $input["status-type"]) { + // echo ''; + // } else { + // echo ''; + // } + // } + // + ?> +
@@ -133,14 +134,15 @@ Description Creation Time - Status - - - - - - - + + + + @@ -215,35 +217,31 @@ $(document).ready(function () { -//------------------------Commenting Client Side filtering-------------------------------------- -// /* 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(); -// } -// } -// }); -// } -// }); + /* 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 */