<commit_before>{% extends "farms/base.html" %}
{% load i18n %}
{% load formtags %}
{% load templatetags %}

{% block title %}{% trans "Farms" %} - {{ block.super }}{% endblock %}

{% block breadcrumb %}
	{{ block.super }}
	<li><span class="bc-arrow"></span></li>
	<li><a href="#">{% trans "Show farms" %}</a></li>
{% endblock %}

{% block men_div_name %}nav_show_farm{% endblock %}

{% block box_title %}
	{% trans "List of farms" %}
{% endblock %}

{% block help_icon %}
    {% include "snippets/help_button.html" %}
{% endblock %}

{% block help_box %}
    {% include "tutorials/show_farm.html" %}
{% endblock %}

{% block auto_refresh %}
    {% trans "Auto refresh" %} <input type="checkbox" checked="checked"/>
{% endblock %}

{% block box_content %}
<script type="text/javascript" src="{{ MEDIA_URL }}js/states.js"></script>

<script type="text/javascript">/*<![CDATA[*/
cc1.sthTable = null;

$(function() {
	cc1.sthTable = cc1.makeSthTable({
		destDiv : '#item-list',
		template : '#rowTemplate',
		urlGetData : '{% url 'far_ajax_get_table' %}',
		autoRefreshTime : 15000,
        idKey: 'farm_id',
	});
	// niszczenie farmy
	cc1.sthTable.destroyFarm = cc1.utils.createAction({
		url: '{% url 'far_ajax_destroy_farm' 0 %}',
		dialogTitle: '{% trans "Destroy farm" %}',
		calculateParams: function(id) {
			return {'desc': cc1.sthTable.getItemById(id).name};
		},
		dialogClass: 'warning'
	});
	// zapis i zamkniecie farmy
	cc1.sthTable.saveAndShutdown = cc1.utils.createAction({
		url: '{% url 'far_ajax_save_and_shutdown' 0 %}',
		dialogTitle: '{% trans "Save and shutdown farm" %}',
		dialogWidth: 500,
	});
	// przypiecie dysku
	cc1.sthTable.assignDisk = cc1.utils.createAction({
		url: '{% url 'vms_ajax_assign_disk' 0 %}',
		dialogTitle: '{% trans "Assign disk" %}',
		dialogWidth: 500,
	});
	// odebranie dysku
	cc1.sthTable.revokeDisk = cc1.utils.createAction({
		url: '{% url 'vms_ajax_revoke_disk' 0 %}',
		dialogTitle: '{% trans "Revoke disk" %}',
		dialogWidth: 500,
	});
	// przydzielenie IP
	cc1.sthTable.assignIp = cc1.utils.createAction({
		url: '{% url 'vms_ajax_assign_ip' 0 %}',
		dialogTitle: '{% trans "Public IP assign" %}',
		calculateGetParams: function(vmId, farmId) {
			return {'desc': cc1.sthTable.getItemById(farmId).vms[0].name};
		},
	});
	// odebranie IP
	cc1.sthTable.revokeIp = cc1.utils.createAction({
		url: '{% url 'vms_ajax_revoke_ip' 0 %}',
		dialogTitle: '{% trans "Revoke IP address" %}',
	});
	// <NAME>
	cc1.sthTable.resetVmPassword = cc1.utils.createAction({
		url: '{% url 'vms_ajax_reset_password' 0 %}',
		dialogTitle: '{% trans "Head password" %}',
		calculatePostParams: function(vmId, farmId) {
			return {'desc': cc1.sthTable.getItemById(farmId).vms[0].name,
					'ids[]': [cc1.sthTable.getItemById(farmId).vms[0].id]};
		},
		calculateGetParams: function(vmId, farmId) {
			return {'desc': cc1.sthTable.getItemById(farmId).vms[0].name,
					'length': cc1.sthTable.getListOfSelected(farmId).length,};
		},
	});
	// przydzielenie IP do wybranego lease'a
	cc1.sthTable.assignchosenIp = cc1.utils.createAction({
		url: '{% url 'vms_ajax_assign_chosen_ip' 0 %}',
		dialogTitle: '{% trans "Public IP assign" %}',
	});
	// odebranie wybranego IP
	cc1.sthTable.revokechosenIp = cc1.utils.createAction({
		url: '{% url 'vms_ajax_revoke_chosen_ip' 0 %}',
		dialogTitle: '{% trans "Revoke IP address" %}',
	});
	// ustawianie klucza
	cc1.sthTable.setSshKey = cc1.utils.createAction({
		url: '{% url 'vms_ajax_ssh_key' %}',
		dialogTitle: '{% trans "Head SSH key" %}',
		calculatePostParams: function(vmId, farmId) {
			return {'desc': cc1.sthTable.getItemById(farmId).vms[0].name,
					'ids[]': [cc1.sthTable.getItemById(farmId).vms[0].vm_id]};
		},
		calculateGetParams: function(vmId, farmId) {
			return {'desc': cc1.sthTable.getItemById(farmId).vms[0].name,
					'length': cc1.sthTable.getListOfSelected(farmId).length,};
		},
	});
});
/*]]>*/</script>

<div id="item-list">
	<script id="rowTemplate" type="text/x-jquery-tmpl">
	{% verbatim2 %}
	<div data-id="${farm_id}" class="farm-div">
		<h3>${name}</h3>
		<table class="tab_details w100pc">
			<tbody>
				<tr>
					<td colspan="4" class="table_bottom_actions farm-actions">
						<div>
							<ul>
								<li class="icon_cancel {{if state !== cc1.states.farm['init_head'] && state !== cc1.states.farm['running'] && state !== cc1.states.farm['nodes_copied']}}inactive{{/if}}">
									<a onclick="{{if state === cc1.states.farm['init_head'] || state === cc1.states.farm['running'] || state === cc1.states.farm['nodes_copied']}}cc1.sthTable.destroyFarm( ${farm_id} );{{/if}}">
										{% trans "Destroy" %}
									</a>
								</li>

								<li class="icon_save_and_shutdown {{if state !== cc1.states.farm['running'] }}inactive{{/if}}">
									<a onclick="{{if state === cc1.states.farm['running'] }}cc1.sthTable.saveAndShutdown( ${farm_id} );{{/if}}">
										{% trans "Save and shutdown" %}
									</a>
								</li>

								<li class="icon_accept {{ if vms[0].state !== cc1.states.vm['running'] && vms[0].state !== cc1.states.vm['running ctx'] }}inactive{{/if}}">
									<a onclick="{{if vms[0].state === cc1.states.vm['running'] || vms[0].state === cc1.states.vm['running ctx'] }}cc1.sthTable.assignDisk( ${ vms[0].vm_id } );{{/if}}">
										{% trans "Assign disk" %}
									</a>
								</li>
								<li class="icon_cancel {{ if vms[0].storage_images.length === 0 }}inactive{{/if}}">
									<a onclick="{{ if vms[0].storage_images.length !== 0 }}cc1.sthTable.revokeDisk( ${ vms[0].vm_id } );{{/if}}">
										{% trans "Revoke disk" %}
									</a>
								</li>

							{{if vms[0].pub_ip.length == 0}}
								<li class="icon_assign_ip {{if vms[0].state !== cc1.states.vm['running'] && vms[0].state !== cc1.states.vm['running ctx']}} inactive {{/if}}">
									<a onclick="{{if vms[0].state === cc1.states.vm['running'] || vms[0].state === cc1.states.vm['running ctx']}} cc1.sthTable.assignchosenIp( ${ vms[0].leases[0].lease_id} ); {{/if}}">
										{% trans "Assign external IP" %}
									</a>
								</li>
							{{else}}
								<li class="icon_assign_ip">
									<a onclick="cc1.sthTable.revokechosenIp( ${ vms[0].leases[0].lease_id});">
										{% trans "Revoke external IP" %}
									</a>
								</li>
							{{/if}}
								<li class="icon_vnc {{if vms[0].state !== cc1.states.vm['running'] && vms[0].state !== cc1.states.vm['running ctx'] }} inactive {{/if}}">
									<a onclick="{{if vms[0].state === cc1.states.vm['running'] || vms[0].state === cc1.states.vm['running ctx'] }} cc1.sthTable.vnc('${ vms[0].vnc_endpoint }', '${ vms[0].vnc_passwd }', '${ vms[0].vm_id }'); {{/if}}">
										{% trans "Graphical console (VNC)" %}
									</a>
								</li>

								<li class="icon_change_password {{if vms[0].state !== cc1.states.vm['running ctx'] }} inactive {{/if}}">
									<a onclick="{{if vms[0].state === cc1.states.vm['running ctx']}} cc1.sthTable.resetVmPassword( ${vms[0].vm_id}, ${farm_id} ); {{/if}}">
										{% trans "Reset password" %}
									</a>
								</li>
								<li class="icon_ssh_key {{if vms[0].state !== cc1.states.vm['running ctx']}} inactive {{/if}}">
									<a onclick="{{if vms[0].state === cc1.states.vm['running ctx'] }} cc1.sthTable.setSshKey( ${vms[0].vm_id}, ${farm_id} ); {{/if}}">
										{% trans "Set SSH key" %}
									</a>
								</li>

							</ul>
							<div class="clear"></div>
						</div>
					</td>
				</tr>

				<tr>
	                <td class="label">{% trans "Name" %}:</td>
	                <td>${name}</td>

	                <td class="label">{% trans "Image" %}:</td>
	                <td>${image_name}</td>
	        	</tr>
	        	<tr>
	                <td class="label">{% trans "Created" %}:</td>
	                <td>${start_time}</td>

	                <td class="label">{% trans "Uptime" %}:</td>
	                <td>${uptime}</td>
	        	</tr>
	        	<tr>
	                <td class="label">{% trans "Head template" %}:</td>
	                <td>${head_template_name}</td>

	                <td class="label">{% trans "Worker node template" %}:</td>
	                <td>${template_name}</td>
	        	</tr>

	        	{{each vms[0].leases}}
	            <tr>
                    <td class="label">{% trans "Head private IP" %}:</td>
                    <td>${address}</td>

                    <td class="label">{% trans "Head public IP" %}:</td>
                    <td>
                    	<ul>
						{{if public_ip }}
							<a onclick="cc1.sthTable.revokechosenIp( ${lease_id} );">
								${ public_ip.address}
							</a>
						{{else state === cc1.states.vm['running'] || state === cc1.states.vm['running ctx']}}
								<a onclick="cc1.sthTable.assignchosenIp( ${lease_id} );">{% trans "Assign" %}</a>
							{{else}}
								{% trans "empty" %}
						{{/if}}
						</ul>
                    </td>
	            </tr>
				{{/each}}

				{{if vms[0].leases.length === 0}}
				<tr>
                    <td class="label">{% trans "Head private IP" %}:</td>
                    <td> {% trans "empty" %}</td>

                    <td class="label">{% trans "Head public IP" %}:</td>
                    <td> {% trans "empty" %}</td>
	            </tr>
				{{/if}}

	            <tr>
	                <td class="label">{% trans "VNC" %}:</td>
                    <td> ${ vms[0].vnc_endpoint } </td>

                    <td class="label">{% trans "VNC password" %}:</td>
                    <td>
	                    <a onclick="cc1.utils.openCopyToClip('${ vms[0].vnc_passwd }');">{% trans "Show" %}</a>
                    </td>
	            </tr>

	        	<tr>
					<td class="label">{% trans "Disks" %}:</td>
					<td>
					{{each vms[0].storage_images}}
						${name},
					{{/each}}
					{{if vms[0].storage_images.length === 0}}
						{% trans "none" %}
					{{/if}}
					</td>

					<td class="label">{% trans "ISO images" %}:</td>
					<td>
					{{each vms[0].iso_images}}
						${name},
					{{/each}}
					{{if vms[0].iso_images.length === 0}}
						{% trans "none" %}
					{{/if}}
					</td>
                </tr>

	        	<tr>
					<td colspan="4" class="table_bottom_actions farm-actions">
						<div>
							<span class="lh">{% trans "State" %}: <b>${stateName}</b></span>
							<span class="tooltip" title="${stateName} - ${stateTooltip}"></span>
							<div class="clear"></div>
						</div>
					</td>
				</tr>
				<tr>
					<td colspan="4">
						<div id="farm_${id}_details">

						{{each vms}}
							<div class="farm-node
							{{if state === cc1.states.vm['running ctx']}}
							farm-node-ok
							{{else state === cc1.states.vm['failed'] || state === cc1.states.vm['saving failed']}}
							farm-node-error
							{{else}}
							farm-node-init
							{{/if}}
							">
								<div class="node-name">
									${name}
									<span class="load">
										${cpuLoadPercent}%&nbsp;
										<span class="cpuLoadBox" style="background: ${cpuLoadColor};"></span>
									</span>
								</div>
								<div class="clear"></div>
								<span class="state">
									${stateName}
									<span class="tableIcon icon_chart" onclick="monitoring( ${ farm_id } );" title="{% trans "Monitoring" %}"></span>
								</span>
								<span class="ip">${priv_ip}</span>
								<div clear="both"></div>
							</div>
						{{/each}}
						</div>
					</td>
				</tr>
			</tbody>
		</table>
	</div>
	{% endverbatim2 %}
	</script>
	<div class="ajax_loader1">&nbsp;</div>
</div>
{% endblock %}<commit_msg>in Farm panel of Web Interface open monitoring for specific VM instead of while Farm<commit_after>{% extends "farms/base.html" %}
{% load i18n %}
{% load formtags %}
{% load templatetags %}

{% block title %}{% trans "Farms" %} - {{ block.super }}{% endblock %}

{% block breadcrumb %}
	{{ block.super }}
	<li><span class="bc-arrow"></span></li>
	<li><a href="#">{% trans "Show farms" %}</a></li>
{% endblock %}

{% block men_div_name %}nav_show_farm{% endblock %}

{% block box_title %}
	{% trans "List of farms" %}
{% endblock %}

{% block help_icon %}
    {% include "snippets/help_button.html" %}
{% endblock %}

{% block help_box %}
    {% include "tutorials/show_farm.html" %}
{% endblock %}

{% block auto_refresh %}
    {% trans "Auto refresh" %} <input type="checkbox" checked="checked"/>
{% endblock %}

{% block box_content %}
<script type="text/javascript" src="{{ MEDIA_URL }}js/states.js"></script>

<script type="text/javascript">/*<![CDATA[*/
cc1.sthTable = null;

$(function() {
	cc1.sthTable = cc1.makeSthTable({
		destDiv : '#item-list',
		template : '#rowTemplate',
		urlGetData : '{% url 'far_ajax_get_table' %}',
		autoRefreshTime : 15000,
        idKey: 'farm_id',
	});
	// niszczenie farmy
	cc1.sthTable.destroyFarm = cc1.utils.createAction({
		url: '{% url 'far_ajax_destroy_farm' 0 %}',
		dialogTitle: '{% trans "Destroy farm" %}',
		calculateParams: function(id) {
			return {'desc': cc1.sthTable.getItemById(id).name};
		},
		dialogClass: 'warning'
	});
	// zapis i zamkniecie farmy
	cc1.sthTable.saveAndShutdown = cc1.utils.createAction({
		url: '{% url 'far_ajax_save_and_shutdown' 0 %}',
		dialogTitle: '{% trans "Save and shutdown farm" %}',
		dialogWidth: 500,
	});
	// przypiecie dysku
	cc1.sthTable.assignDisk = cc1.utils.createAction({
		url: '{% url 'vms_ajax_assign_disk' 0 %}',
		dialogTitle: '{% trans "Assign disk" %}',
		dialogWidth: 500,
	});
	// odebranie dysku
	cc1.sthTable.revokeDisk = cc1.utils.createAction({
		url: '{% url 'vms_ajax_revoke_disk' 0 %}',
		dialogTitle: '{% trans "Revoke disk" %}',
		dialogWidth: 500,
	});
	// przydzielenie IP
	cc1.sthTable.assignIp = cc1.utils.createAction({
		url: '{% url 'vms_ajax_assign_ip' 0 %}',
		dialogTitle: '{% trans "Public IP assign" %}',
		calculateGetParams: function(vmId, farmId) {
			return {'desc': cc1.sthTable.getItemById(farmId).vms[0].name};
		},
	});
	// odebranie IP
	cc1.sthTable.revokeIp = cc1.utils.createAction({
		url: '{% url 'vms_ajax_revoke_ip' 0 %}',
		dialogTitle: '{% trans "Revoke IP address" %}',
	});
	// <NAME>
	cc1.sthTable.resetVmPassword = cc1.utils.createAction({
		url: '{% url 'vms_ajax_reset_password' 0 %}',
		dialogTitle: '{% trans "Head password" %}',
		calculatePostParams: function(vmId, farmId) {
			return {'desc': cc1.sthTable.getItemById(farmId).vms[0].name,
					'ids[]': [cc1.sthTable.getItemById(farmId).vms[0].id]};
		},
		calculateGetParams: function(vmId, farmId) {
			return {'desc': cc1.sthTable.getItemById(farmId).vms[0].name,
					'length': cc1.sthTable.getListOfSelected(farmId).length,};
		},
	});
	// przydzielenie IP do wybranego lease'a
	cc1.sthTable.assignchosenIp = cc1.utils.createAction({
		url: '{% url 'vms_ajax_assign_chosen_ip' 0 %}',
		dialogTitle: '{% trans "Public IP assign" %}',
	});
	// odebranie wybranego IP
	cc1.sthTable.revokechosenIp = cc1.utils.createAction({
		url: '{% url 'vms_ajax_revoke_chosen_ip' 0 %}',
		dialogTitle: '{% trans "Revoke IP address" %}',
	});
	// ustawianie klucza
	cc1.sthTable.setSshKey = cc1.utils.createAction({
		url: '{% url 'vms_ajax_ssh_key' %}',
		dialogTitle: '{% trans "Head SSH key" %}',
		calculatePostParams: function(vmId, farmId) {
			return {'desc': cc1.sthTable.getItemById(farmId).vms[0].name,
					'ids[]': [cc1.sthTable.getItemById(farmId).vms[0].vm_id]};
		},
		calculateGetParams: function(vmId, farmId) {
			return {'desc': cc1.sthTable.getItemById(farmId).vms[0].name,
					'length': cc1.sthTable.getListOfSelected(farmId).length,};
		},
	});
});
/*]]>*/</script>

<div id="item-list">
	<script id="rowTemplate" type="text/x-jquery-tmpl">
	{% verbatim2 %}
	<div data-id="${farm_id}" class="farm-div">
		<h3>${name}</h3>
		<table class="tab_details w100pc">
			<tbody>
				<tr>
					<td colspan="4" class="table_bottom_actions farm-actions">
						<div>
							<ul>
								<li class="icon_cancel {{if state !== cc1.states.farm['init_head'] && state !== cc1.states.farm['running'] && state !== cc1.states.farm['nodes_copied']}}inactive{{/if}}">
									<a onclick="{{if state === cc1.states.farm['init_head'] || state === cc1.states.farm['running'] || state === cc1.states.farm['nodes_copied']}}cc1.sthTable.destroyFarm( ${farm_id} );{{/if}}">
										{% trans "Destroy" %}
									</a>
								</li>

								<li class="icon_save_and_shutdown {{if state !== cc1.states.farm['running'] }}inactive{{/if}}">
									<a onclick="{{if state === cc1.states.farm['running'] }}cc1.sthTable.saveAndShutdown( ${farm_id} );{{/if}}">
										{% trans "Save and shutdown" %}
									</a>
								</li>

								<li class="icon_accept {{ if vms[0].state !== cc1.states.vm['running'] && vms[0].state !== cc1.states.vm['running ctx'] }}inactive{{/if}}">
									<a onclick="{{if vms[0].state === cc1.states.vm['running'] || vms[0].state === cc1.states.vm['running ctx'] }}cc1.sthTable.assignDisk( ${ vms[0].vm_id } );{{/if}}">
										{% trans "Assign disk" %}
									</a>
								</li>
								<li class="icon_cancel {{ if vms[0].storage_images.length === 0 }}inactive{{/if}}">
									<a onclick="{{ if vms[0].storage_images.length !== 0 }}cc1.sthTable.revokeDisk( ${ vms[0].vm_id } );{{/if}}">
										{% trans "Revoke disk" %}
									</a>
								</li>

							{{if vms[0].pub_ip.length == 0}}
								<li class="icon_assign_ip {{if vms[0].state !== cc1.states.vm['running'] && vms[0].state !== cc1.states.vm['running ctx']}} inactive {{/if}}">
									<a onclick="{{if vms[0].state === cc1.states.vm['running'] || vms[0].state === cc1.states.vm['running ctx']}} cc1.sthTable.assignchosenIp( ${ vms[0].leases[0].lease_id} ); {{/if}}">
										{% trans "Assign external IP" %}
									</a>
								</li>
							{{else}}
								<li class="icon_assign_ip">
									<a onclick="cc1.sthTable.revokechosenIp( ${ vms[0].leases[0].lease_id});">
										{% trans "Revoke external IP" %}
									</a>
								</li>
							{{/if}}
								<li class="icon_vnc {{if vms[0].state !== cc1.states.vm['running'] && vms[0].state !== cc1.states.vm['running ctx'] }} inactive {{/if}}">
									<a onclick="{{if vms[0].state === cc1.states.vm['running'] || vms[0].state === cc1.states.vm['running ctx'] }} cc1.sthTable.vnc('${ vms[0].vnc_endpoint }', '${ vms[0].vnc_passwd }', '${ vms[0].vm_id }'); {{/if}}">
										{% trans "Graphical console (VNC)" %}
									</a>
								</li>

								<li class="icon_change_password {{if vms[0].state !== cc1.states.vm['running ctx'] }} inactive {{/if}}">
									<a onclick="{{if vms[0].state === cc1.states.vm['running ctx']}} cc1.sthTable.resetVmPassword( ${vms[0].vm_id}, ${farm_id} ); {{/if}}">
										{% trans "Reset password" %}
									</a>
								</li>
								<li class="icon_ssh_key {{if vms[0].state !== cc1.states.vm['running ctx']}} inactive {{/if}}">
									<a onclick="{{if vms[0].state === cc1.states.vm['running ctx'] }} cc1.sthTable.setSshKey( ${vms[0].vm_id}, ${farm_id} ); {{/if}}">
										{% trans "Set SSH key" %}
									</a>
								</li>

							</ul>
							<div class="clear"></div>
						</div>
					</td>
				</tr>

				<tr>
	                <td class="label">{% trans "Name" %}:</td>
	                <td>${name}</td>

	                <td class="label">{% trans "Image" %}:</td>
	                <td>${image_name}</td>
	        	</tr>
	        	<tr>
	                <td class="label">{% trans "Created" %}:</td>
	                <td>${start_time}</td>

	                <td class="label">{% trans "Uptime" %}:</td>
	                <td>${uptime}</td>
	        	</tr>
	        	<tr>
	                <td class="label">{% trans "Head template" %}:</td>
	                <td>${head_template_name}</td>

	                <td class="label">{% trans "Worker node template" %}:</td>
	                <td>${template_name}</td>
	        	</tr>

	        	{{each vms[0].leases}}
	            <tr>
                    <td class="label">{% trans "Head private IP" %}:</td>
                    <td>${address}</td>

                    <td class="label">{% trans "Head public IP" %}:</td>
                    <td>
                    	<ul>
						{{if public_ip }}
							<a onclick="cc1.sthTable.revokechosenIp( ${lease_id} );">
								${ public_ip.address}
							</a>
						{{else state === cc1.states.vm['running'] || state === cc1.states.vm['running ctx']}}
								<a onclick="cc1.sthTable.assignchosenIp( ${lease_id} );">{% trans "Assign" %}</a>
							{{else}}
								{% trans "empty" %}
						{{/if}}
						</ul>
                    </td>
	            </tr>
				{{/each}}

				{{if vms[0].leases.length === 0}}
				<tr>
                    <td class="label">{% trans "Head private IP" %}:</td>
                    <td> {% trans "empty" %}</td>

                    <td class="label">{% trans "Head public IP" %}:</td>
                    <td> {% trans "empty" %}</td>
	            </tr>
				{{/if}}

	            <tr>
	                <td class="label">{% trans "VNC" %}:</td>
                    <td> ${ vms[0].vnc_endpoint } </td>

                    <td class="label">{% trans "VNC password" %}:</td>
                    <td>
	                    <a onclick="cc1.utils.openCopyToClip('${ vms[0].vnc_passwd }');">{% trans "Show" %}</a>
                    </td>
	            </tr>

	        	<tr>
					<td class="label">{% trans "Disks" %}:</td>
					<td>
					{{each vms[0].storage_images}}
						${name},
					{{/each}}
					{{if vms[0].storage_images.length === 0}}
						{% trans "none" %}
					{{/if}}
					</td>

					<td class="label">{% trans "ISO images" %}:</td>
					<td>
					{{each vms[0].iso_images}}
						${name},
					{{/each}}
					{{if vms[0].iso_images.length === 0}}
						{% trans "none" %}
					{{/if}}
					</td>
                </tr>

	        	<tr>
					<td colspan="4" class="table_bottom_actions farm-actions">
						<div>
							<span class="lh">{% trans "State" %}: <b>${stateName}</b></span>
							<span class="tooltip" title="${stateName} - ${stateTooltip}"></span>
							<div class="clear"></div>
						</div>
					</td>
				</tr>
				<tr>
					<td colspan="4">
						<div id="farm_${id}_details">

						{{each vms}}
							<div class="farm-node
							{{if state === cc1.states.vm['running ctx']}}
							farm-node-ok
							{{else state === cc1.states.vm['failed'] || state === cc1.states.vm['saving failed']}}
							farm-node-error
							{{else}}
							farm-node-init
							{{/if}}
							">
								<div class="node-name">
									${name}
									<span class="load">
										${cpuLoadPercent}%&nbsp;
										<span class="cpuLoadBox" style="background: ${cpuLoadColor};"></span>
									</span>
								</div>
								<div class="clear"></div>
								<span class="state">
									${stateName}
									<span class="tableIcon icon_chart" onclick="monitoring( ${ vm_id } );" title="{% trans "Monitoring" %}"></span>
								</span>
								<span class="ip">${priv_ip}</span>
								<div clear="both"></div>
							</div>
						{{/each}}
						</div>
					</td>
				</tr>
			</tbody>
		</table>
	</div>
	{% endverbatim2 %}
	</script>
	<div class="ajax_loader1">&nbsp;</div>
</div>
{% endblock %}
{'fraction_non_alphanumeric': 0.21850709974380128, 'fraction_numerical': 0.013982370055147858, 'mean_word_length': 2.5501772776321876, 'pattern_counts': {'":': 0, '<': 385, '<?xml version=': 0, '>': 385, 'https://': 0, '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': '7375711', 'n_tokens_mistral': 10434, 'n_tokens_neox': 8276, 'n_words': 1538}