Skip to content

Commit

Permalink
Merge pull request #583 from grycap/egi_brand_v2
Browse files Browse the repository at this point in the history
Add support to greater_than and less_than TOSCA constaints
  • Loading branch information
micafer authored Oct 28, 2024
2 parents 601f3cf + 3a4bfd8 commit 07eeb5b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
15 changes: 8 additions & 7 deletions app/templates/infrastructures.html
Original file line number Diff line number Diff line change
Expand Up @@ -154,13 +154,13 @@ <h4 class="font-weight-bold text-primary">My Infrastructures</h4>
<!--Table head-->
<thead>
<tr>
<th style="width: 10%" scope="col">Name</th>
<th style="width: 25%; white-space: nowrap;" scope="col">Infrastructure uuid</th>
<th style="width: 5%; white-space: nowrap;" scope="col">Cloud Type</th>
<th style="width: 20%; white-space: nowrap;" scope="col">Cloud Info</th>
<th style="width: 10%" scope="col">Status</th>
<th style="width: 17%" scope="col">VMs</th>
<th style="width: 13%" scope="col">Actions</th>
<th style="width: 10%" scope="col" class="no-sort">Name</th>
<th style="width: 25%; white-space: nowrap;" scope="col" class="no-sort">Infrastructure uuid</th>
<th style="width: 5%; white-space: nowrap;" scope="col" class="no-sort">Cloud Type</th>
<th style="width: 20%; white-space: nowrap;" scope="col" class="no-sort">Cloud Info</th>
<th style="width: 10%" scope="col" class="no-sort">Status</th>
<th style="width: 17%" scope="col" class="no-sort">VMs</th>
<th style="width: 13%" scope="col" class="no-sort">Actions</th>
</tr>
</thead>
<!--Table head-->
Expand Down Expand Up @@ -569,6 +569,7 @@ <h5 class="modal-title" id="change_auth_label_{{infId}}">Change/Add Owner</h5>
$('#tableUserDeployments').dataTable( {
"responsive": true,
"order": [],
//"ordering": false
"columnDefs": [ {
"targets" : 'no-sort',
"orderable": false,
Expand Down
4 changes: 3 additions & 1 deletion app/templates/input_types.html
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,10 @@
<!-- end PortSpec type -->

{% elif value.type == "integer" %}
{% set min_value = value.constraints | selectattr('greater_than') | map(attribute='greater_than') | list %}
{% set max_value = value.constraints | selectattr('less_than') | map(attribute='less_than') | list %}
<!-- number type -->
<input type="number" class="form-control" id="{{key}}" name="{{key}}" value="{{input_value}}" aria-describedby="help{{key}}" {% if value.required %}required{%endif%}/>
<input type="number" class="form-control" id="{{key}}" name="{{key}}" value="{{input_value}}" aria-describedby="help{{key}}" {% if value.required %}required{%endif%} {% if min_value %}min="{{min_value[0]}}"{%endif%} {% if max_value %}max="{{max_value[0]}}"{%endif%}/>
{% elif value.type == "scalar-unit.size" %}
<input type="text" class="form-control" id="{{key}}" name="{{key}}" value="{{input_value}}" pattern="[0-9]*( )([TMG]B)" title="Number Unit(MB, GB or TB)">
{% else %}
Expand Down

0 comments on commit 07eeb5b

Please sign in to comment.