<commit_before>{% macro render_ca_credentials(model, column) %}
    <a href="{{ url_for('credentialsdata.cert_view', id=model.ca_credentials_id) }}">[cert]</a>
    <a href="{{ url_for('credentialsdata.cert_text_view', id=model.ca_credentials_id) }}">[text]</a>
    <a href="{{ url_for('credentialsdata.key_view', id=model.ca_credentials_id) }}">[key]</a>

    <form class="icon" method="POST" action="{{ url_for('cluster.reissue_ca_creds_view', id=model.id) }}">
        <button onclick="return confirm('Are you sure you want to reissue this credentials?');" class="btn btn-link">
            [reissue]
        </button>
    </form>

    {% set ca_credentials_error = model.ca_credentials_error %}
    {% if ca_credentials_error %}
        <span class="glyphicon glyphicon-exclamation-sign text-danger" title="{{ ca_credentials_error }}" style="cursor: pointer"></span>
    {% endif %}
{% endmacro %}

{% macro render_info(model, column) %}
    <ul>
        <li>
            Download kubeconfig and activate it:<br>
            <code>$ export KUBECONFIG=/path/to/kubeconfig</code>
        </li>
        <li>
            Install k8s addons:
            <ul>
                <li><code>$ kubectl create -f {{request.url_root }}manifests/{{ model.name }}/kube-system-role-binding.yaml</code></li>
                <li><code>$ helm init</code></li>
                <li><code>$ helm install {{request.url_root }}helm/{{ model.name }}/k8s-addons.tar.gz</code></li>
            </ul>
        </li>
        {% set etcd_servers_count = model.nodes.filter_by(is_etcd_server=True).count() %}
        {% if etcd_servers_count % 2 == 0 %}
            <li class="text-danger">Even etcd servers number</li>
        {% endif %}
    </ul>
{% endmacro %}
<commit_msg>improve cluster admin page<commit_after>{% macro render_ca_credentials(model, column) %}
    <a href="{{ url_for('credentialsdata.cert_view', id=model.ca_credentials_id) }}">[cert]</a>
    <a href="{{ url_for('credentialsdata.cert_text_view', id=model.ca_credentials_id) }}">[text]</a>
    <a href="{{ url_for('credentialsdata.key_view', id=model.ca_credentials_id) }}">[key]</a>

    <form class="icon" method="POST" action="{{ url_for('cluster.reissue_ca_creds_view', id=model.id) }}">
        <button onclick="return confirm('Are you sure you want to reissue this credentials?');" class="btn btn-link">
            [reissue]
        </button>
    </form>

    {% set ca_credentials_error = model.ca_credentials_error %}
    {% if ca_credentials_error %}
        <span class="glyphicon glyphicon-exclamation-sign text-danger" title="{{ ca_credentials_error }}" style="cursor: pointer"></span>
    {% endif %}
{% endmacro %}

{% macro render_info(model, column) %}
    <div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true">
      <div class="panel panel-default">
        <div class="panel-heading" role="tab" id="headingOne">
          <h4 class="panel-title">
            <a role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseOne" aria-expanded="true" aria-controls="collapseOne">
              Components
            </a>
          </h4>
        </div>
        <div id="collapseOne" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="headingOne">
          <div class="panel-body">
            <ul>
                <li>
                    <strong>etcd servers:</strong>
                    <ul>
                        {% for node in model.nodes.filter_by(is_etcd_server=True) %}
                            <li>{{ node.fqdn }}</li>
                        {% endfor %}
                    </ul>
                </li>
                <li>
                    <strong>Kubernetes master nodes:</strong>
                    <ul>
                        {% for node in model.nodes.filter_by(is_k8s_master=True) %}
                            <li>{{ node.fqdn }}</li>
                        {% endfor %}
                    </ul>
                </li>
                <li>
                    <strong>Kubernetes schedulable nodes:</strong>
                    <ul>
                        {% for node in model.nodes.filter_by(is_k8s_schedulable=True) %}
                            <li>{{ node.fqdn }}</li>
                        {% endfor %}
                    </ul>
                </li>
            </ul>
          </div>
        </div>
      </div>
      <div class="panel panel-default">
        <div class="panel-heading" role="tab" id="headingTwo">
          <h4 class="panel-title">
            <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseTwo" aria-expanded="false" aria-controls="collapseTwo">
              Addons installation
            </a>
          </h4>
        </div>
        <div id="collapseTwo" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingTwo">
          <div class="panel-body">
            <ul>
                <li>
                    Download kubeconfig and activate it:<br>
                    <code>$ export KUBECONFIG=/path/to/kubeconfig</code>
                </li>
                <li>
                    Install k8s addons:
                    <ul>
                        <li><code>$ kubectl create -f {{request.url_root }}manifests/{{ model.name }}/kube-system-role-binding.yaml</code></li>
                        <li><code>$ helm init</code></li>
                        <li><code>$ helm install {{request.url_root }}helm/{{ model.name }}/k8s-addons.tar.gz</code></li>
                    </ul>
                </li>
                {% set etcd_servers_count = model.nodes.filter_by(is_etcd_server=True).count() %}
                {% if etcd_servers_count % 2 == 0 %}
                    <li class="text-danger">Even etcd servers number</li>
                {% endif %}
            </ul>
          </div>
        </div>
      </div>
    </div>
{% endmacro %}

{'fraction_non_alphanumeric': 0.15835876568328247, 'fraction_numerical': 0.002373685995252628, 'mean_word_length': 1.9465534465534466, 'pattern_counts': {'":': 0, '<': 129, '<?xml version=': 0, '>': 129, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4665380', 'n_tokens_mistral': 1872, 'n_tokens_neox': 1736, 'n_words': 340}