From 67c8a3e961dd781a26f1a25d322f8d8230bde58f Mon Sep 17 00:00:00 2001 From: aaron Date: Wed, 16 Oct 2024 19:23:52 -0400 Subject: [PATCH 1/2] Intuitive message for when resource not assigned --- AiravataWrapper.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/AiravataWrapper.php b/AiravataWrapper.php index a792ce3..d6336b0 100644 --- a/AiravataWrapper.php +++ b/AiravataWrapper.php @@ -319,8 +319,10 @@ function get_compute_resource($experimentId) try { $experimentModel = $this->airavataclient->getExperiment($this->authToken,$experimentId); $comRescheduling = $experimentModel->userConfigurationData->computationalResourceScheduling; - if ($comRescheduling != null) { + if ($comRescheduling != null && !empty($comRescheduling->resourceHostId)) { return select_compute_resource_name($this->airavataconfig, $comRescheduling->resourceHostId); + } else { + return "Resource not yet assigned"; } } catch (AiravataSystemException $ase) { echo $ase->getMessage(); From 9447ac85017bb87bb93d9a8842ca0eb9ff842402 Mon Sep 17 00:00:00 2001 From: aaron-auc <95181880+aaron-auc@users.noreply.github.com> Date: Wed, 16 Oct 2024 19:41:47 -0400 Subject: [PATCH 2/2] modify from double quotes to single quotes for consistency --- AiravataWrapper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AiravataWrapper.php b/AiravataWrapper.php index d6336b0..8d21331 100644 --- a/AiravataWrapper.php +++ b/AiravataWrapper.php @@ -322,7 +322,7 @@ function get_compute_resource($experimentId) if ($comRescheduling != null && !empty($comRescheduling->resourceHostId)) { return select_compute_resource_name($this->airavataconfig, $comRescheduling->resourceHostId); } else { - return "Resource not yet assigned"; + return ' Resource not yet assigned '; } } catch (AiravataSystemException $ase) { echo $ase->getMessage();