<commit_before>{% extends "DellaertWebappDeploymentBundle::layout.html.twig" %}

{% block content %}
	{% if entity %}
		<script type="text/javascript">
			function confirmDelete() {
				if( confirm('Are you sure you want to delete this application?') ) {
					window.location = "{{ path('ApplicationDelete',{ 'id': entity.id }) }}";
				}
			function confirmApplicationTemplateParameterDelete(id) {
				if( confirm('Are you sure you want to delete this deployment?') ) {
					window.location = "{{ path('DeploymentDeleteNoId') }}/"+id;
				}
			}
			}
		</script>
		<div id="entitybuttons"><a href="{{ path('ApplicationEdit',{ 'id': entity.id }) }}" class="button left">Edit</a><a href="javascript:confirmDelete()" class="button right">Delete</a></div>
		<h1>Application: {{ entity.name }}</h1>
		<table cellspacing="0">
			<tr>
				<th width="20%">Organisation</th>
				<td width="30%">{{ entity.organisation }}</td>
				<th width="20%">Application template</th>
				<td width="30%">
					<a href="{{ path('ApplicationTemplateViewSlug',{ 'slug': entity.applicationTemplate.slug }) }}">{{ entity.applicationTemplate.name }}</a>
				</td>
			</tr>
			<tr>
				<th>Plesk</th>
				<td colspan="3">{% if entity.pleskCapable %}Yes{% else %}No{% endif %}</td>
			</tr>
		</table>
	    
	    <h2>Application parameters</h2>
	    <table cellspacing="0" class="sortable">
	    	<tr>
	    		<th>Parameter</th>
	    		<th>Value</th>
	    		<th width="10%"></th>
	    	</tr>
	    	{% for applicationParameterValue in entity.applicationParameterValues %}
	    		<tr>
	    			<td>{{ applicationParameterValue.applicationTemplateParameter.name }}</td>
	    			<td>{% if applicationParameterValue.applicationTemplateParameter.isPassword %}<i>hidden</i>{% else %}{{ applicationParameterValue.value }}{% endif %}</td>
	    			<td><a href="{{ path('ApplicationParameterValueEdit',{ 'id': applicationParameterValue.id }) }}" class="button save">Edit</a></td>
	    		</tr>
	    	{% endfor %}
	    </table>

		<div id="entitybuttons"><a href="{{ path('DeploymentAdd', { 'id': entity.id }) }}" class="button add">Add deployment</a></div>
	    <h2>Deployments</h2>
	    <table cellspacing="0" class="sortable">
	    	<tr>
	    		<th>Hostname</th>
	    		<th>Server</th>
	    		<th>Type</th>
	    		<th width="40%"></th>
	    	</tr>
	    	{% for deployment in entity.deployments %}
	    		<tr>
	    			<td><a href="http://{{ deployment.hostname }}" target="_blank">{{ deployment.hostname }}</a></td>
	    			<td><a href="{{ path('ServerViewSlug',{ 'slug': deployment.server.slug }) }}">{{ deployment.server.host }}</a></td>
	    			<td>{{ deployment.serverType.name }}</td>
	    			<td>{% if deployment.deployed %}<a href="{{ path('DeploymentRedeploy', { 'id': deployment.id }) }}" class="button save left">Redeploy</a><a href="{{ path('DeploymentUndeploy', { 'id': deployment.id }) }}" class="button delete middle">Undeploy</a><a href="javascript:confirmDeploymentDelete({{ deployment.id }})" class="button delete right">Delete</a>{% else %}<a href="{{ path('DeploymentDeploy', { 'id': deployment.id }) }}" class="button save left">Deploy</a><a href="javascript:confirmDeploymentDelete({{ deployment.id }})" class="button delete right">Delete</a>{% endif %}</td>
	    		</tr>
	    	{% endfor %}
	    </table>
	{% else %}
		<h1>Unknown application</h1>
		<p>The specified application is not available.</p>
	{% endif %}
{% endblock %}<commit_msg>cleanup<commit_after>{% extends "DellaertWebappDeploymentBundle::layout.html.twig" %}

{% block content %}
	{% if entity %}
		<script type="text/javascript">
			function confirmDelete() {
				if( confirm('Are you sure you want to delete this application?') ) {
					window.location = "{{ path('ApplicationDelete',{ 'id': entity.id }) }}";
				}
			function confirmApplicationTemplateParameterDelete(id) {
				if( confirm('Are you sure you want to delete this deployment?') ) {
					window.location = "{{ path('DeploymentDeleteNoId') }}/"+id;
				}
			}
			}
		</script>
		<div id="entitybuttons"><a href="{{ path('ApplicationEdit',{ 'id': entity.id }) }}" class="button left">Edit</a><a href="javascript:confirmDelete()" class="button right">Delete</a></div>
		<h1>Application: {{ entity.name }}</h1>
		<table cellspacing="0">
			<tr>
				<th width="20%">Organisation</th>
				<td width="30%">{{ entity.organisation }}</td>
				<th width="20%">Application template</th>
				<td width="30%">
					<a href="{{ path('ApplicationTemplateViewSlug',{ 'slug': entity.applicationTemplate.slug }) }}">{{ entity.applicationTemplate.name }}</a>
				</td>
			</tr>
			<tr>
				<th>Plesk</th>
				<td colspan="3">{% if entity.pleskCapable %}Yes{% else %}No{% endif %}</td>
			</tr>
		</table>
	    
	    <h2>Application parameters</h2>
	    <table cellspacing="0" class="sortable">
	    	<tr>
	    		<th>Parameter</th>
	    		<th>Value</th>
	    		<th width="10%"></th>
	    	</tr>
	    	{% for applicationParameterValue in entity.applicationParameterValues %}
	    		<tr>
	    			<td>{{ applicationParameterValue.applicationTemplateParameter.name }}</td>
	    			<td>{% if applicationParameterValue.applicationTemplateParameter.isPassword %}<i>hidden</i>{% else %}{{ applicationParameterValue.value }}{% endif %}</td>
	    			<td><a href="{{ path('ApplicationParameterValueEdit',{ 'id': applicationParameterValue.id }) }}" class="button save">Edit</a></td>
	    		</tr>
	    	{% endfor %}
	    </table>

		<div id="entitybuttons"><a href="{{ path('DeploymentAdd', { 'id': entity.id }) }}" class="button add">Add deployment</a></div>
	    <h2>Deployments</h2>
	    <table cellspacing="0" class="sortable">
	    	<tr>
	    		<th>Hostname</th>
	    		<th>Server</th>
	    		<th>Type</th>
	    		<th width="40%"></th>
	    	</tr>
	    	{% for deployment in entity.deployments %}
	    		<tr>
	    			<td><a href="http://{{ deployment.hostname }}" target="_blank">{{ deployment.hostname }}</a></td>
	    			<td><a href="{{ path('ServerViewSlug',{ 'slug': deployment.server.slug }) }}">{{ deployment.server.host }}</a></td>
	    			<td>{{ deployment.serverType.name }}</td>
	    			<td align="right">{% if deployment.deployed %}<a href="{{ path('DeploymentRedeploy', { 'id': deployment.id }) }}" class="button save left">Redeploy</a><a href="{{ path('DeploymentUndeploy', { 'id': deployment.id }) }}" class="button delete middle">Undeploy</a><a href="javascript:confirmDeploymentDelete({{ deployment.id }})" class="button delete right">Delete</a>{% else %}<a href="{{ path('DeploymentDeploy', { 'id': deployment.id }) }}" class="button save left">Deploy</a><a href="javascript:confirmDeploymentDelete({{ deployment.id }})" class="button delete right">Delete</a>{% endif %}</td>
	    		</tr>
	    	{% endfor %}
	    </table>
	{% else %}
		<h1>Unknown application</h1>
		<p>The specified application is not available.</p>
	{% endif %}
{% endblock %}
{'fraction_non_alphanumeric': 0.20925817757009346, 'fraction_numerical': 0.007009345794392523, 'mean_word_length': 3.913199426111908, 'pattern_counts': {'":': 0, '<': 203, '<?xml version=': 0, '>': 203, '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': '5096141', 'n_tokens_mistral': 2523, 'n_tokens_neox': 2213, 'n_words': 445}