<commit_before>{% block navbar %}
   {% include "csv2/navigation_bar.html" %}
{% endblock %}

<head>
{% load static %}
{% load template_utils %}
{% load mathfilters %}

<link rel="stylesheet" type="text/css" href="{% static "csv2/common.css" %}">
<link rel="stylesheet" type="text/css" href="{% static "csv2/status.css" %}">

<meta id="refresher" http-equiv="refresh" content="30">

<script type="text/javascript">
    var TimerSwitch = 1;

    function set_refresh(time) {
        TimerSwitch = 1;
        setTimeout(function() {
            location.reload();
        },time);

        document.getElementById('vms-iframe').src='';
    }

    function stop_refresh() {
        TimerSwitch = 0;
        window.stop();
    }

    function pass_url(url) {
        stop_refresh();
        document.getElementById('vms-iframe').src='/vm/list/'+url;
    }
</script>
</head>

<body class="status-nav">


{% if err_message is not None %}
    <p style="color:red;">{{err_message}}</p>
{% endif %}
{% if message is not None %}
    <p style="color:green;">{{message}}</p>
{% endif %}


<div class="status-div">

    <div class="toggle-button">
        <label for="toggle-row">
            <img src="{% static "csv2/expand.svg" %}" alt="expand rows">
        </label>
    </div>

    <div class="status-table">
        <table>
          <colgroup>
            <col class="red" span="1" />
            <col class="clear" span="5" />

          </colgroup>
          <thead>
            <tr class="header-row">
                <th class="jobs-style">Jobs</th>
                <th class="jobs-style">Idle</th>
                <th class="jobs-style">Running</th>
                <th class="jobs-style">Completed</th>
                <th class="jobs-style">Held</th>
                <th class="jobs-style">Other</th>

            </tr>
            {% for cloud in job_status_list %}
                <tr>

                    {% if cloud.Jobs == 0 %}
                        <td class="zero-style">0</td>
                    {% else %}
                        <td class="more-style"><a href="#">{{cloud.Jobs}}</a></td>
                    {% endif %}

                    {% if cloud.Idle == 0 %}
                        <td class="zero-style">0</td>
                    {% else %}
                        <td class="more-style"><a href="#">{{cloud.Idle}}</a></td>
                    {% endif %}

                    {% if cloud.Running == 0 %}
                        <td class="zero-style">0</td>
                    {% else %}
                        <td class="more-style"><a href="#">{{cloud.Running}}</a></td>
                    {% endif %}

                    {% if cloud.Completed == 0 %}
                        <td class="zero-style">0</td>
                    {% else %}
                        <td class="more-style"><a href="#">{{cloud.Completed}}</a></td>
                    {% endif %}

                    {% if cloud.Held == 0 %}
                        <td class="zero-style">0</td>
                    {% else %}
                        <td class="more-style"><a href="#">{{cloud.Held}}</a></td>
                    {% endif %}

                    {% if cloud.Other == 0 %}
                        <td class="zero-style">0</td>
                    {% else %}
                        <td class="more-style"><a href="#">{{cloud.Other}}</a></td>
                    {% endif %}

                </tr>
            {% endfor %}

            <tr class="bottom-row">
                <td colspan="6"></td>
            </tr>

            </tbody> 
        </table>
    </div>



    <!--
    https://codepen.io/istro/pen/daker 
    https://codersblock.com/blog/checkbox-trickery-with-css/
    -->

    <!--
    <input id="how-other" name="how" type="radio">
    <label for="how-other" class="side-label">Other...</label>

    <div class="how-other-disclosure">
      <label for="how-other-explain" class="top-label">Please explain</label>
      <textarea id="how-other-explain"></textarea>
    </div>
    -->



    <br>
    {% set VMstotal = 0 %}
    {% set VMs_foreign_total = 0 %}
    <div class="status-table">
        <input class="toggle-box" id="toggle-row" type="checkbox"></input>

        <table>
          <colgroup>
            <col class="grey" span="1"/>
            <col class="clear" span="22" />
          </colgroup>
          <thead>
            <tr class="header-row">
                <th class="name-style">Clouds</th>
                <th class="native-style">VMs</th>
                <th class="native-style">Starting</th>
                <th class="native-style">Unreg.</th>
                <th class="native-style">Idle</th>                
                <th class="native-style">Running</th>
                <th class="native-style">Retiring</th>
                <th class="native-style">Manual</th>
                <th class="native-style">Error</th>
                <th class="native-style">Other</th>

                <th class="col-spacer">&nbsp;</th>


                <th class="native-style" colspan="2">
                    <table>
                        <tr colspan="2">Native Cores</tr>
                        <tr>
                            <th>Used</th>
                            <th>Limit</th>
                        </tr>
                    </table>
                </th>

                <th class="col-spacer">&nbsp;</th>

                <th class="foreign-style">Foreign<br>VMs</th>
                <th class="foreign-style">Foreign<br>Cores</th>

                <th class="col-spacer">&nbsp;</th>


                <th class="total-style" colspan="2">
                    <table>
                        <tr colspan="2">Global Cores</tr>
                        <tr>
                            <th>Used</th>
                            <th>Total</th>
                        </tr>
                    </table>
                </th>


                <th class="col-spacer">&nbsp;</th>

                <th class="native-style">Slots</th>
                <th class="native-style" colspan="2">
                    <table>
                        <tr colspan="2">Slot Cores</tr>
                        <tr>
                            <th>Busy</th>
                            <th>Idle</th>
                        </tr>
                    </table>
                </th>
                <!--
                <th class="native-style">Slots<br>Used Cores</th>
                <th class="native-style">Slots<br>Idle Cores</th>
                -->
            </tr>
            {% for cloud in cloud_status_list %}

                {% if cloud.enabled == 1 or cloud.VMs > 0 %}
                    <tr>
                    {% if cloud.enabled == 1 %}
                        <td class="title-style">
                    {% else %}
                        <td class="disabled-style">
                    {% endif %}
                        <a onclick="pass_url('{{cloud.cloud_name}}::::')" href="#vms-overlay">{{cloud.cloud_name}}</a></td>

                        {% if cloud.VMs == 0 %}
                            <td class="zero-style">0</td>
                        {% else %}
                            <td class="more-style"><a onclick="pass_url('{{cloud.cloud_name}}::native::')" href="#vms-overlay">{{cloud.VMs}}</a></td>
                        {% endif %}

                        {% if cloud.VMs_starting == 0 %}
                            <td class="zero-style">0</td>
                        {% else %}
                            <td class="more-style"><a onclick="pass_url('{{cloud.cloud_name}}::starting::')" href="#vms-overlay">{{cloud.VMs_starting}}</a></td>
                        {% endif %}


                        {% if cloud.VMs_unregistered == 0 %}
                            <td class="zero-style">0</td>
                        {% else %}
                            <td class="more-style"><a onclick="pass_url('{{cloud.cloud_name}}::unregistered::')" href="#vms-overlay">{{cloud.VMs_unregistered}}</a></td>
                        {% endif %}


                        {% if cloud.VMs_idle == 0 %}
                            <td class="zero-style">0</td>
                        {% else %}
                            <td class="more-style"><a onclick="pass_url('{{cloud.cloud_name}}::idle::')" href="#vms-overlay">{{cloud.VMs_idle}}</a></td>
                        {% endif %}


                        {% if cloud.VMs_running == 0 %}
                            <td class="zero-style">0</td>
                        {% else %}
                            <td class="more-style"><a onclick="pass_url('{{cloud.cloud_name}}::running::')" href="#vms-overlay">{{cloud.VMs_running}}</td>
                        {% endif %}


                        {% if cloud.VMs_retiring == 0 %}
                            <td class="zero-style">0</td>
                        {% else %}
                            <td class="more-style"><a onclick="pass_url('{{cloud.cloud_name}}::retiring::')" href="#vms-overlay">{{cloud.VMs_retiring}}</td>
                        {% endif %}


                        {% if cloud.VMs_manual == 0 %}
                            <td class="zero-style">0</td>
                        {% else %}
                            <td class="more-style"><a onclick="pass_url('{{cloud.cloud_name}}::manual::')" href="#vms-overlay">{{cloud.VMs_manual}}</td>
                        {% endif %}


                        {% if cloud.VMs_in_error == 0 %}
                            <td class="zero-style">0</td>
                        {% else %}
                            <td class="more-style"><a onclick="pass_url('{{cloud.cloud_name}}::error::')" href="#vms-overlay">{{cloud.VMs_in_error}}</td>
                        {% endif %}


                        {% if cloud.VMs_other == 0 %}
                            <td class="zero-style">0</td>
                        {% else %}
                            <td class="more-style"><a onclick="pass_url('{{cloud.cloud_name}}::other::')" href="#vms-overlay">{{cloud.VMs_other}}</td>
                        {% endif %}

                        <td class="col-spacer">&nbsp;</td>


                        {% if cloud.cores_native == 0 %}
                            <td class="zero-style">0</td>
                        {% elif cloud.cores_ctl == -1 %}
                            <td class="sysctl-style">{{cloud.cores_native}}</td>
                        {% else %}
                            <td class="manual-style">{{cloud.cores_native}}</td>
                        {% endif %}

                        {% if cloud.cores_limit == 0 %}
                            <td class="zero-style">0</td>
                        {% elif cloud.cores_ctl == -1 %}
                            <td class="sysctl-style">{{cloud.cores_limit}}</td>
                        {% else %}
                            <td class="manual-style">{{cloud.cores_limit}}</td>
                        {% endif %}



                        <td class="col-spacer">&nbsp;</td>


                        {% if cloud.Foreign_VMs == 0 %}
                            <td class="zero-style">0</td>
                        {% else %}
                            <td class="more-style"><a onclick="pass_url('{{cloud.cloud_name}}::foreign::')" href="#vms-overlay">{{ cloud.Foreign_VMs }}</a></td>
                        {% endif %}



                        {% if cloud.cores_foreign == 0 %}
                            <td class="zero-style">0</td>
                        {% else %}
                            <td class="more-style">{{ cloud.cores_foreign }}</a></td>
                        {% endif %}

                        <td class="col-spacer">&nbsp;</td>


                        <!--******************************-->
                        {% if cloud.cores_max == 0 %}
                            <td class="zero-style">0</td>
                        {% else %}
                            <td class="more-style">{{ cloud.cores_native_foreign }}</a></td>
                        {% endif %}
                        <!--******************************-->


                        {% if cloud.cores_max == 0 %}
                            <td class="zero-style">0</td>
                        {% else %}
                            <td class="more-style">{{ cloud.cores_idle_native_foreign }}</a></td>
                        {% endif %}


                        <td class="col-spacer">&nbsp;</td>

                        {% if cloud.slot_count == 0 %}
                            <td class="zero-style">0</td>
                        {% else %}<commit_msg>Now uses cloud quota again<commit_after>{% block navbar %}
   {% include "csv2/navigation_bar.html" %}
{% endblock %}

<head>
{% load static %}
{% load template_utils %}
{% load mathfilters %}

<link rel="stylesheet" type="text/css" href="{% static "csv2/common.css" %}">
<link rel="stylesheet" type="text/css" href="{% static "csv2/status.css" %}">

<meta id="refresher" http-equiv="refresh" content="30">

<script type="text/javascript">
    var TimerSwitch = 1;

    function set_refresh(time) {
        TimerSwitch = 1;
        setTimeout(function() {
            location.reload();
        },time);

        document.getElementById('vms-iframe').src='';
    }

    function stop_refresh() {
        TimerSwitch = 0;
        window.stop();
    }

    function pass_url(url) {
        stop_refresh();
        document.getElementById('vms-iframe').src='/vm/list/'+url;
    }
</script>
</head>

<body class="status-nav">


{% if err_message is not None %}
    <p style="color:red;">{{err_message}}</p>
{% endif %}
{% if message is not None %}
    <p style="color:green;">{{message}}</p>
{% endif %}


<div class="status-div">

    <div class="toggle-button">
        <label for="toggle-row">
            <img src="{% static "csv2/expand.svg" %}" alt="expand rows">
        </label>
    </div>

    <div class="status-table">
        <table>
          <colgroup>
            <col class="red" span="1" />
            <col class="clear" span="5" />

          </colgroup>
          <thead>
            <tr class="header-row">
                <th class="jobs-style">Jobs</th>
                <th class="jobs-style">Idle</th>
                <th class="jobs-style">Running</th>
                <th class="jobs-style">Completed</th>
                <th class="jobs-style">Held</th>
                <th class="jobs-style">Other</th>

            </tr>
            {% for cloud in job_status_list %}
                <tr>

                    {% if cloud.Jobs == 0 %}
                        <td class="zero-style">0</td>
                    {% else %}
                        <td class="more-style"><a href="#">{{cloud.Jobs}}</a></td>
                    {% endif %}

                    {% if cloud.Idle == 0 %}
                        <td class="zero-style">0</td>
                    {% else %}
                        <td class="more-style"><a href="#">{{cloud.Idle}}</a></td>
                    {% endif %}

                    {% if cloud.Running == 0 %}
                        <td class="zero-style">0</td>
                    {% else %}
                        <td class="more-style"><a href="#">{{cloud.Running}}</a></td>
                    {% endif %}

                    {% if cloud.Completed == 0 %}
                        <td class="zero-style">0</td>
                    {% else %}
                        <td class="more-style"><a href="#">{{cloud.Completed}}</a></td>
                    {% endif %}

                    {% if cloud.Held == 0 %}
                        <td class="zero-style">0</td>
                    {% else %}
                        <td class="more-style"><a href="#">{{cloud.Held}}</a></td>
                    {% endif %}

                    {% if cloud.Other == 0 %}
                        <td class="zero-style">0</td>
                    {% else %}
                        <td class="more-style"><a href="#">{{cloud.Other}}</a></td>
                    {% endif %}

                </tr>
            {% endfor %}

            <tr class="bottom-row">
                <td colspan="6"></td>
            </tr>

            </tbody> 
        </table>
    </div>



    <!--
    https://codepen.io/istro/pen/daker 
    https://codersblock.com/blog/checkbox-trickery-with-css/
    -->

    <!--
    <input id="how-other" name="how" type="radio">
    <label for="how-other" class="side-label">Other...</label>

    <div class="how-other-disclosure">
      <label for="how-other-explain" class="top-label">Please explain</label>
      <textarea id="how-other-explain"></textarea>
    </div>
    -->



    <br>
    {% set VMstotal = 0 %}
    {% set VMs_foreign_total = 0 %}
    <div class="status-table">
        <input class="toggle-box" id="toggle-row" type="checkbox" autocomplete="on"></input>

        <table>
          <colgroup>
            <col class="grey" span="1"/>
            <col class="clear" span="22" />
          </colgroup>
          <thead>
            <tr class="header-row">
                <th class="name-style">Clouds</th>
                <th class="native-style">VMs</th>
                <th class="native-style">Starting</th>
                <th class="native-style">Unreg.</th>
                <th class="native-style">Idle</th>                
                <th class="native-style">Running</th>
                <th class="native-style">Retiring</th>
                <th class="native-style">Manual</th>
                <th class="native-style">Error</th>
                <th class="native-style">Other</th>

                <th class="col-spacer">&nbsp;</th>


                <th class="native-style" colspan="2">
                    <table>
                        <tr colspan="2">Native Cores</tr>
                        <tr>
                            <th>Used</th>
                            <th>Limit</th>
                        </tr>
                    </table>
                </th>

                <th class="col-spacer">&nbsp;</th>

                <th class="foreign-style">Foreign<br>VMs</th>
                <th class="foreign-style">Foreign<br>Cores</th>

                <th class="col-spacer">&nbsp;</th>


                <th class="total-style" colspan="2">
                    <table>
                        <tr colspan="2">Global Cores</tr>
                        <tr>
                            <th>Used</th>
                            <th>Quota</th>
                        </tr>
                    </table>
                </th>


                <th class="col-spacer">&nbsp;</th>

                <th class="native-style">Slots</th>
                <th class="native-style" colspan="2">
                    <table>
                        <tr colspan="2">Slot Cores</tr>
                        <tr>
                            <th>Busy</th>
                            <th>Idle</th>
                        </tr>
                    </table>
                </th>
                <!--
                <th class="native-style">Slots<br>Used Cores</th>
                <th class="native-style">Slots<br>Idle Cores</th>
                -->
            </tr>
            {% for cloud in cloud_status_list %}

                {% if cloud.enabled == 1 or cloud.VMs > 0 %}
                    <tr>
                    {% if cloud.enabled == 1 %}
                        <td class="title-style">
                    {% else %}
                        <td class="disabled-style">
                    {% endif %}
                        <a onclick="pass_url('{{cloud.cloud_name}}::::')" href="#vms-overlay">{{cloud.cloud_name}}</a></td>

                        {% if cloud.VMs == 0 %}
                            <td class="zero-style">0</td>
                        {% else %}
                            <td class="more-style"><a onclick="pass_url('{{cloud.cloud_name}}::native::')" href="#vms-overlay">{{cloud.VMs}}</a></td>
                        {% endif %}

                        {% if cloud.VMs_starting == 0 %}
                            <td class="zero-style">0</td>
                        {% else %}
                            <td class="more-style"><a onclick="pass_url('{{cloud.cloud_name}}::starting::')" href="#vms-overlay">{{cloud.VMs_starting}}</a></td>
                        {% endif %}


                        {% if cloud.VMs_unregistered == 0 %}
                            <td class="zero-style">0</td>
                        {% else %}
                            <td class="more-style"><a onclick="pass_url('{{cloud.cloud_name}}::unregistered::')" href="#vms-overlay">{{cloud.VMs_unregistered}}</a></td>
                        {% endif %}


                        {% if cloud.VMs_idle == 0 %}
                            <td class="zero-style">0</td>
                        {% else %}
                            <td class="more-style"><a onclick="pass_url('{{cloud.cloud_name}}::idle::')" href="#vms-overlay">{{cloud.VMs_idle}}</a></td>
                        {% endif %}


                        {% if cloud.VMs_running == 0 %}
                            <td class="zero-style">0</td>
                        {% else %}
                            <td class="more-style"><a onclick="pass_url('{{cloud.cloud_name}}::running::')" href="#vms-overlay">{{cloud.VMs_running}}</td>
                        {% endif %}


                        {% if cloud.VMs_retiring == 0 %}
                            <td class="zero-style">0</td>
                        {% else %}
                            <td class="more-style"><a onclick="pass_url('{{cloud.cloud_name}}::retiring::')" href="#vms-overlay">{{cloud.VMs_retiring}}</td>
                        {% endif %}


                        {% if cloud.VMs_manual == 0 %}
                            <td class="zero-style">0</td>
                        {% else %}
                            <td class="more-style"><a onclick="pass_url('{{cloud.cloud_name}}::manual::')" href="#vms-overlay">{{cloud.VMs_manual}}</td>
                        {% endif %}


                        {% if cloud.VMs_in_error == 0 %}
                            <td class="zero-style">0</td>
                        {% else %}
                            <td class="more-style"><a onclick="pass_url('{{cloud.cloud_name}}::error::')" href="#vms-overlay">{{cloud.VMs_in_error}}</td>
                        {% endif %}


                        {% if cloud.VMs_other == 0 %}
                            <td class="zero-style">0</td>
                        {% else %}
                            <td class="more-style"><a onclick="pass_url('{{cloud.cloud_name}}::other::')" href="#vms-overlay">{{cloud.VMs_other}}</td>
                        {% endif %}

                        <td class="col-spacer">&nbsp;</td>


                        {% if cloud.cores_native == 0 %}
                            <td class="zero-style">0</td>
                        {% elif cloud.cores_ctl == -1 %}
                            <td class="sysctl-style">{{cloud.cores_native}}</td>
                        {% else %}
                            <td class="manual-style">{{cloud.cores_native}}</td>
                        {% endif %}

                        {% if cloud.cores_limit == 0 %}
                            <td class="zero-style">0</td>
                        {% elif cloud.cores_ctl == -1 %}
                            <td class="sysctl-style">{{cloud.cores_limit}}</td>
                        {% else %}
                            <td class="manual-style">{{cloud.cores_limit}}</td>
                        {% endif %}



                        <td class="col-spacer">&nbsp;</td>


                        {% if cloud.Foreign_VMs == 0 %}
                            <td class="zero-style">0</td>
                        {% else %}
                            <td class="more-style"><a onclick="pass_url('{{cloud.cloud_name}}::foreign::')" href="#vms-overlay">{{ cloud.Foreign_VMs }}</a></td>
                        {% endif %}



                        {% if cloud.cores_foreign == 0 %}
                            <td class="zero-style">0</td>
                        {% else %}
                            <td class="more-style">{{ cloud.cores_foreign }}</a></td>
                        {% endif %}

                        <td class="col-spacer">&nbsp;</td>


                        <!--******************************-->
                        {% if cloud.cores_native_foreign == 0 %}
                            <td class="zero-style">0</td>
                        {% else %}
                            <td class="more-style">{{ cloud.cores_native_foreign }}</a></td>
                        {% endif %}
                        <!--******************************-->


                        {% if cloud.cores_max == 0 %}
                            <td class="zero-style">0</td>
                        {% else %}
                            <td class="more-style">{{ cloud.cores_max }}</a></td>
                        {% endif %}


                        <td class="col-spacer">&nbsp;</td>

                        {% if cloud.slot_count == 0 %}
                            <td class="zero-style">0</td>
                        {% else %}
{'fraction_non_alphanumeric': 0.17686507936507936, 'fraction_numerical': 0.005714285714285714, 'mean_word_length': 1.1561430527036276, 'pattern_counts': {'":': 0, '<': 575, '<?xml version=': 0, '>': 577, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1887840', 'n_tokens_mistral': 7533, 'n_tokens_neox': 6467, 'n_words': 1045}