-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #81 from deligianp/master
Refactor provision of on-demand batch computation project and update corresponding workflow file
- Loading branch information
Showing
4 changed files
with
82 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,83 +1,95 @@ | ||
<?php | ||
|
||
use yii\helpers\Html; | ||
use yii\widgets\LinkPager; | ||
use app\components\Headers; | ||
use app\models\Token; | ||
use yii\helpers\Url; | ||
use yii\helpers\Url; | ||
|
||
echo Html::CssFile('@web/css/project/tokens.css'); | ||
$this->registerJsFile('@web/js/project/index.js', ['depends' => [\yii\web\JqueryAsset::className()]]); | ||
|
||
$back_icon=''; | ||
$access_icon='<i class="fas fa-external-link-square-alt"></i>'; | ||
$update_icon='<i class="fas fa-pencil-alt"></i>'; | ||
$back_link='/project/index'; | ||
$delete_icon='<i class="fas fa-times"></i>'; | ||
$new_icon='<i class="fas fa-plus-circle"></i>'; | ||
$exclamation_icon='<i class="fas fa-exclamation-triangle" style="color:orange" title="The Vm belongs to an expired project"></i>'; | ||
$back_icon = ''; | ||
$access_icon = '<i class="fas fa-external-link-square-alt"></i>'; | ||
$update_icon = '<i class="fas fa-pencil-alt"></i>'; | ||
$back_link = '/project/index'; | ||
$delete_icon = '<i class="fas fa-times"></i>'; | ||
$new_icon = '<i class="fas fa-plus-circle"></i>'; | ||
$exclamation_icon = '<i class="fas fa-exclamation-triangle" style="color:orange" title="The Vm belongs to an expired project"></i>'; | ||
$mode = 0; | ||
$edit_button_class=''; | ||
$access_button_class =''; | ||
$edit_button_class = ''; | ||
$access_button_class = ''; | ||
$ondemand_access_class = ''; | ||
|
||
|
||
Headers::begin() ?> | ||
<?php | ||
echo Headers::widget( | ||
['title'=>'Project management '."</br>", | ||
'subtitle'=>$project->name, | ||
'buttons'=> | ||
[ | ||
['fontawesome_class'=>$back_icon,'name'=> 'Back', 'action'=>[$back_link], 'type'=>'a', | ||
'options'=>['class'=>'btn btn-default', 'style'=>'width: 100px; color:grey ']] | ||
], | ||
]); | ||
echo Headers::widget( | ||
['title' => 'Project management ' . "</br>", | ||
'subtitle' => $project->name, | ||
'buttons' => | ||
[ | ||
['fontawesome_class' => $back_icon, 'name' => 'Back', 'action' => [$back_link], 'type' => 'a', | ||
'options' => ['class' => 'btn btn-default', 'style' => 'width: 100px; color:grey ']] | ||
], | ||
]); | ||
?> | ||
<?Headers::end()?> | ||
<? Headers::end() ?> | ||
<br> | ||
<h4><b> Approved resources</b></h4> | ||
<div id="containerIntro"> | ||
<h4><b>   Jobs: </b></h4><p><?=$initial_jobs?> (remaining: <?=$remaining_jobs?>)</p> <br> | ||
<h4><b>   Cores: </b></h4><p><?=$details->cores?> (average use: <?=round($usage['cpu']/1000,2)?>)</p><br> | ||
<h4><b>   Ram: </b></h4><p><?=$details->ram?>GB (average use: <?=round($usage['ram']/1000,2)?>GB)</p><br><br> | ||
<h4><b>   Jobs: </b></h4> | ||
<p><?= $initial_jobs ?> (remaining: <?= $remaining_jobs ?>)</p> <br> | ||
<h4><b>   Cores: </b></h4> | ||
<p><?= $details->cores ?> (average use: <?= round($usage['cpu'] / 1000, 2) ?>)</p><br> | ||
<h4><b>   Ram: </b></h4> | ||
<p><?= $details->ram ?>GB (average use: <?= round($usage['ram'] / 1000, 2) ?>GB)</p><br><br> | ||
|
||
<p> *These computational resources are available for the execution of containerized software packages and workflows.</p> | ||
<p> *These computational resources are available for the execution of containerized software packages and | ||
workflows.</p> | ||
</div> | ||
|
||
<br> | ||
<h4><b> Using the resources</b></h4> | ||
<div id="containerIntro"> | ||
<p>  There are two ways to use the approved computational resources of this project:</p> <br> | ||
<p>        ‐ Use our Job execution User Interface (UI) to manually run computational analysis tasks leveraging Web-based wizards.</p> <br> | ||
<p>        ‐ Use our Job execution API to programmatically run computational analysis tasks (API tokens need to be issued).</p> <br><br> | ||
|
||
<p>  You can select the way that better fits your needs (but it's possible to consume your approved resources using both ways):</p><br> | ||
<h4><b>Gaining access</b></h4> | ||
<p> | ||
In order to use the task execution infrastructure an API key is required. You can manage your API keys in the | ||
page: | ||
</p> | ||
<div class="text-center"> | ||
<?= Html::a("API keys management", ['/project/token-management', 'id' => $id], ['class' => "btn btn-success btn-md $edit_button_class"]) ?> | ||
</div> | ||
|
||
<br> | ||
<div style="float: left; width: 49.5%;text-align:right"> | ||
<?=Html::a("Job execution UI",$compute,['class'=>"btn btn-success btn-md $access_button_class $ondemand_access_class", 'style'=>'width:270px; height:60px; text-align: center; line-height: 45px; font-size:20px; ','target'=>'_blank'])?> | ||
<br/> | ||
<br/> | ||
<?=Html::a("API tokens management",['/project/token-management', 'id'=>$id],['class'=>"btn btn-success btn-md $edit_button_class", 'style'=>'width:270px; height:60px; text-align: center; line-height: 45px; font-size:20px;'])?> | ||
</div> | ||
|
||
<div style="float: right; width: 49.5%;text-align:left"> | ||
<?=Html::a("UI user guide",'index.php?r=site%2Fhelp',['class'=>"btn btn btn-secondary btn-md $access_button_class $ondemand_access_class", 'style'=>'width:270px; height:60px; text-align: center; line-height: 45px; font-size:20px;'])?> | ||
<br/> | ||
<br/> | ||
<?=Html::a("API documentation",'https://schema.athenarc.gr/docs/schema-api/',['class'=>"btn btn btn-secondary btn-md $access_button_class $ondemand_access_class", 'style'=>'width:270px; height:60px; text-align: center; line-height: 45px; font-size:20px;','target'=>'_blank'])?> | ||
<h4><b> Using the resources</b></h4> | ||
<p>  There are two ways to schedule task executions:</p> <br> | ||
<div class="p-4 row"> | ||
<div class="col-6 border-right border-muted"> | ||
<h5><b>SCHEMA api</b></h5> | ||
<p> | ||
Use our Job execution REST API to programmatically run computational analysis tasks | ||
</p> | ||
<div class="text-center"> | ||
<?= Html::a("SCHEMA api Swagger", Yii::$app->params["schema_api_url"] ?? "#", ['class' => "btn btn-success btn-md $access_button_class $ondemand_access_class"]) ?> | ||
</div> | ||
</div> | ||
<div class="col-6"> | ||
<h5><b>HYPATIA lab</b></h5> | ||
<p> | ||
Use our Job execution User Interface (UI) to manually run | ||
computational analysis tasks | ||
</p> | ||
<div class="text-center"> | ||
<?= Html::a("HYPATIA lab", Yii::$app->params["hypatia_lab_url"] ?? "#", ['class' => "btn btn-md $access_button_class $ondemand_access_class text-white", 'style' => 'background-color: #e6833b', 'target' => '_blank']) ?> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<br> | ||
<br/> | ||
<br> | ||
<br/> | ||
<p class="h4"><b> Monitoring job execution</b></p> | ||
<div id="containerIntro"> | ||
<p>  API calls can used to retrieve the status of the computational jobs related to this project (for details, see API documentation). | ||
<br>  You can also examine the status of any job from the respective page of the Job execution UI:</p> <br> | ||
|
||
<h4><b>How to schedule on-demand batch computation tasks</b></h4> | ||
<p> | ||
Learn about the task execution infrastructure and how to run tasks on the provided documentation: | ||
<div class="text-center"> | ||
<?= Html::a("Documentation", Yii::$app->params["schema_api_docs_url"] ?? "#", ['class' => "btn btn-success btn-md $access_button_class $ondemand_access_class", 'target' => '_blank']) ?> | ||
</div> | ||
<br> | ||
<center> | ||
<?=Html::a("Job monitoring UI",'https://hypatia-comp.athenarc.gr/index.php?r=software%2Fhistory',['class'=>"btn btn-success btn-md $access_button_class $ondemand_access_class", 'style'=>'width:270px; height:60px; text-align: center; line-height: 45px; font-size:20px;','target'=>'_blank'])?> | ||
</center> | ||
</p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters