"Fossies" - the Fresh Open Source Software Archive

Member "horizon-20.1.2/openstack_dashboard/dashboards/project/instances/templates/instances/_flavors_and_quotas.html" (29 Apr 2022, 5368 Bytes) of package /linux/misc/openstack/horizon-20.1.2.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) HTML source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 {% load i18n horizon humanize bootstrap %}
    2 
    3 {% block help_message %}
    4 {% endblock %}
    5 
    6 <h4>{% trans "Flavor Details" %}</h4>
    7 <table class="flavor_table table table-striped table-fixed">
    8   <tbody>
    9     <tr><td class="flavor_name">{% trans "Name" %}</td><td><span id="flavor_name" class="truncate"></span></td></tr>
   10     <tr><td class="flavor_name">{% trans "VCPUs" %}</td><td><span id="flavor_vcpus"></span></td></tr>
   11     <tr><td class="flavor_name">{% trans "Root Disk" %}</td><td><span id="flavor_disk"></span> {% trans "GB" %}</td></tr>
   12     <tr><td class="flavor_name">{% trans "Ephemeral Disk" %}</td><td><span id="flavor_ephemeral"></span> {% trans "GB" %}</td></tr>
   13     <tr><td class="flavor_name">{% trans "Total Disk" %}</td><td><span id="flavor_disk_total"></span> {% trans "GB" %}</td></tr>
   14     <tr><td class="flavor_name">{% trans "RAM" %}</td><td><span id="flavor_ram"></span> {% trans "MB" %}</td></tr>
   15   </tbody>
   16 </table>
   17 
   18 <div class="quota-dynamic">
   19   <h4>{% trans "Project Limits" %}</h4>
   20   <div class="quota_title">
   21     <strong class="pull-left">{% trans "Number of Instances" %}</strong>
   22     <span class="pull-right">
   23       {% blocktrans trimmed with used=usages.totalInstancesUsed|intcomma quota=usages.maxTotalInstances|intcomma|quotainf %}
   24       {{ used }} of {{ quota }} Used
   25       {% endblocktrans %}
   26     </span>
   27   </div>
   28 
   29  {{ minifyspace }}
   30   <div id="{{ resize_instance|yesno:"quota_resize_instance,quota_instances" }}"
   31        class="quota_bar"
   32        data-progress-indicator-flavor
   33        data-quota-limit="{{ usages.maxTotalInstances }}"
   34        data-quota-used="{{ usages.totalInstancesUsed }}">
   35     {% widthratio usages.totalInstancesUsed usages.maxTotalInstances 100 as instance_percent %}
   36     {% bs_progress_bar instance_percent 0 %}
   37   </div>
   38  {{ endminifyspace }}
   39 
   40   <div class="quota_title">
   41     <strong class="pull-left">{% trans "Number of VCPUs" %}</strong>
   42     <span class="pull-right">
   43       {% blocktrans trimmed with used=usages.totalCoresUsed|intcomma quota=usages.maxTotalCores|intcomma|quotainf %}
   44       {{ used }} of {{ quota }} Used
   45       {% endblocktrans %}
   46     </span>
   47   </div>
   48 
   49   {{ minifyspace }}
   50   <div id="quota_vcpus"
   51        class="quota_bar"
   52        data-progress-indicator-flavor
   53        data-quota-limit="{{ usages.maxTotalCores }}"
   54        data-quota-used="{{ usages.totalCoresUsed }}">
   55     {% widthratio usages.totalCoresUsed usages.maxTotalCores 100 as vcpu_percent %}
   56     {% bs_progress_bar vcpu_percent 0 %}
   57   </div>
   58   {{ endminifyspace }}
   59 
   60   <div class="quota_title">
   61     <strong class="pull-left">{% trans "Total RAM" %}</strong>
   62     <span class="pull-right">
   63       {% blocktrans trimmed with used=usages.totalRAMUsed|intcomma quota=usages.maxTotalRAMSize|intcomma|quotainf %}
   64       {{ used }} of {{ quota }} MB Used
   65       {% endblocktrans %}
   66     </span>
   67   </div>
   68 
   69   {{ minifyspace }}
   70   <div id="quota_ram"
   71        class="quota_bar"
   72        data-progress-indicator-flavor
   73        data-quota-limit="{{ usages.maxTotalRAMSize }}"
   74        data-quota-used="{{ usages.totalRAMUsed }}">
   75     {% widthratio usages.totalRAMUsed usages.maxTotalRAMSize 100 as vcpu_percent %}
   76     {% bs_progress_bar vcpu_percent 0 %}
   77   </div>
   78   {{ endminifyspace }}
   79 
   80   {% if cinder_enabled %}
   81   <div class="quota_title">
   82     <strong class="pull-left">{% trans "Number of Volumes" %}</strong>
   83     <span class="pull-right">
   84       {% blocktrans with used=usages.totalVolumesUsed|intcomma quota=usages.maxTotalVolumes|intcomma|quotainf %}
   85       {{ used }} of {{ quota }} Used
   86       {% endblocktrans %}
   87     </span>
   88   </div>
   89   <div id="quota_volume"
   90        class="quota_bar"
   91        data-progress-indicator-flavor
   92        data-quota-limit="{{ usages.maxTotalVolumes }}"
   93        data-quota-used="{{ usages.totalVolumesUsed }}">
   94     {% widthratio usages.totalVolumesUsed usages.maxTotalVolumes 100 as volume_percent %}
   95     {% bs_progress_bar volume_percent 0 %}
   96   </div>
   97 
   98   <div class="quota_title">
   99     <strong class="pull-left">{% trans "Total Volume Storage" %}</strong>
  100     <span class="pull-right">
  101       {% blocktrans with used=usages.totalGigabytesUsed|intcomma quota=usages.maxTotalVolumeGigabytes|intcomma|quotainf %}
  102       {{ used }} of {{ quota }} GiB Used
  103       {% endblocktrans %}
  104     </span>
  105   </div>
  106   <div id="quota_volume_storage"
  107        class="quota_bar"
  108        data-progress-indicator-flavor
  109        data-quota-limit="{{ usages.maxTotalVolumeGigabytes }}"
  110        data-quota-used="{{ usages.totalGigabytesUsed }}">
  111      {% widthratio usages.totalGigabytesUsed usages.maxTotalVolumeGigabytes 100 as volume_storage_percent %}
  112      {% bs_progress_bar volume_storage_percent 0 %}
  113   </div>
  114   {% endif %}
  115 
  116 </div>
  117 
  118 
  119 <script type="text/javascript" charset="utf-8">
  120   some_disabled_msg = '{{_("Some flavors not meeting minimum boot source requirements have been disabled.")|escapejs }}';
  121   all_disabled_msg = '{{_("No flavors meet minimum criteria for selected boot source.")|escapejs }}';
  122 
  123   if(typeof horizon.Quota !== 'undefined') {
  124     horizon.Quota.initWithFlavors({{ flavors|safe|default:"{}" }});
  125     horizon.Quota.initWithImages({{ images|safe|default:"{}"}}, some_disabled_msg, all_disabled_msg);
  126   } else {
  127     addHorizonLoadEvent(function() {
  128       horizon.Quota.initWithFlavors({{ flavors|safe|default:"{}" }});
  129       horizon.Quota.initWithImages({{ images|safe|default:"{}"}}, some_disabled_msg, all_disabled_msg);
  130     });
  131   }
  132 </script>