Commit 101d86ee authored by Leonidas Poulopoulos's avatar Leonidas Poulopoulos

Aligned branch internationalization with latest changes in master

parents be9ee8b3 cc0c4fcf
===========
0.8.7 RELEASE
Minor enhancements
Enhancements:
- Merged all mail txt files into one
- Added all routes in form cleaning (initially, EXPIRED, ADMININACTIVE and ERROR were excluded)
===========
0.8.6 RELEASE
Minor UI enhancements/Bug fix
Fixes:
- Fixed issue where rules in ERROR state would cause check_sync to check them
Enhancements:
- Added small dots to ongoing response field to indicate activity
===========
0.8.5 RELEASE
Feature enhancement release/Minor UI fixes/Cleanup
Fixes:
- Changed javascript order to prevent unformated content in datatables
- Un-needed files cleanup
- Error template is now based on base.html template
Enhancements:
- Administrator privileges apply on UI as well
- Enhanced application security
===========
0.8.4 RELEASE
Vulnerability prevention/bug fixes release
Fixes:
- Fixed a bug where the shib auth backend erased non-shibboleth users info
- Added an authsource variable to prevent authentication backend overlapping
- Added exception handling for non-Shibboleth users that do not belong to a peer
===========
0.8.3 RELEASE
Feature enhancement release
......
......@@ -73,7 +73,19 @@ In settings.py set the following according to your configuration:
* PRIMARY_WHOIS
* ALTERNATE_WHOIS
4.2 Installation
4.2 Branding
4.2.1 Logos
Inside the static folder you will find two empty png files: logo.dist.png (172x80) and shib_login.dist.png (98x80).
Edit those two with your favourite image processing software and save them as logo.png and shib_login.png under the same folder. Image sizes are optimized to operate without any
other code changes. In case you want to incorporate images of different sizes you have to fine tune css and/or html as well.
4.2.2 Footer
Under the templates folder (templates), you can alter the footer.html file to include your own footer messages, badges, etc.
4.3 Installation
* Run:
./manage.py syncdb
......
......@@ -10,6 +10,9 @@ class shibauthBackend:
firstname = kwargs.get('firstname')
lastname = kwargs.get('lastname')
mail = kwargs.get('mail')
authsource = kwargs.get('authsource')
if authsource != 'shibboleth':
return None
try:
user = self._auth_user(username, firstname, lastname, mail)
except:
......@@ -22,10 +25,6 @@ class shibauthBackend:
try:
user = User.objects.get(username__exact=username)
user.email = mail
user.first_name = firstname
user.last_name = lastname
user.save()
# The user did not exist. Create one with no privileges
except:
user = User.objects.create_user(username, mail, None)
......
......@@ -4,6 +4,7 @@ from django.utils.translation import ugettext as _
from django.utils.translation import ugettext_lazy
from django.template.defaultfilters import filesizeformat
from flowspy.flowspec.models import *
from flowspy.peers.models import *
from ipaddr import *
from django.core.urlresolvers import reverse
from django.contrib.auth.models import User
......@@ -25,7 +26,14 @@ class RouteForm(forms.ModelForm):
class Meta:
model = Route
def clean_applier(self):
applier = self.cleaned_data['applier']
if applier:
return self.cleaned_data["applier"]
else:
raise forms.ValidationError('This field is required.')
def clean_source(self):
user = User.objects.get(pk=self.data['applier'])
peer = user.get_profile().peer
......@@ -106,8 +114,15 @@ class RouteForm(forms.ModelForm):
destinationports = self.cleaned_data.get('destinationport', None)
protocols = self.cleaned_data.get('protocol', None)
user = self.cleaned_data.get('applier', None)
try:
issuperuser = self.data['issuperuser']
su = User.objects.get(username=issuperuser)
except:
issuperuser = None
peer = user.get_profile().peer
networks = peer.networks.all()
if issuperuser:
networks = PeerRange.objects.filter(peer__in=Peer.objects.all()).distinct()
mynetwork = False
route_pk_list = []
if destination:
......@@ -116,7 +131,7 @@ class RouteForm(forms.ModelForm):
if IPNetwork(destination) in net:
mynetwork = True
if not mynetwork:
raise forms.ValidationError(_('Destination address/network should belong to your administrative address space. Check My Profile to review your networks'))
raise forms.ValidationError(_('Destination address/network should belong to your administrative address space. Check My Profile to review your networks'))
if (sourceports and ports):
raise forms.ValidationError(_('Cannot create rule for source ports and ports at the same time. Select either ports or source ports'))
if (destinationports and ports):
......@@ -129,7 +144,7 @@ class RouteForm(forms.ModelForm):
raise forms.ValidationError(_('Fill at least a Rule Match Condition'))
if not user.is_superuser and then[0].action not in settings.UI_USER_THEN_ACTIONS:
raise forms.ValidationError(_('This action "%s" is not permitted') %(then[0].action))
existing_routes = Route.objects.exclude(status='EXPIRED').exclude(status='ERROR').exclude(status='ADMININACTIVE')
existing_routes = Route.objects.all()
existing_routes = existing_routes.filter(applier__userprofile__peer=peer)
if source:
source = IPNetwork(source).compressed
......
......@@ -123,8 +123,9 @@ def check_sync(route_name=None, selected_routes = []):
routes = routes.filter(name=route_name)
for route in routes:
if route.has_expired() and (route.status != 'EXPIRED' and route.status != 'ADMININACTIVE' and route.status != 'INACTIVE'):
logger.info('Expiring route %s' %route.name)
subtask(delete).delay(route, reason="EXPIRED")
if route.status != 'ERROR':
logger.info('Expiring %s route %s' %(route.status, route.name))
subtask(delete).delay(route, reason="EXPIRED")
# elif route.has_expired() and (route.status == 'ADMININACTIVE' or route.status == 'INACTIVE'):
# route.status = 'EXPIRED'
# route.response = 'Rule Expired'
......@@ -149,8 +150,8 @@ def notify_expired():
admin_url = "https://%s%s" % \
(fqdn,
"/fod/edit/%s"%route.name)
mail_body = render_to_string("rule_expiration.txt",
{"route": route, 'expiration_days':expiration_days, 'url':admin_url})
mail_body = render_to_string("rule_action.txt",
{"route": route, 'expiration_days':expiration_days, 'action':'expires', 'url':admin_url})
days_num = ' days'
expiration_days_text = "%s %s" %('in',expiration_days)
if expiration_days == 0:
......
This diff is collapsed.
This diff is collapsed.
......@@ -45,7 +45,7 @@ a:hover {
}
#main {
background: url("/static/background_grnet.png") repeat-x scroll 0 0 #FFFFFF;
background: url("/static/background.png") repeat-x scroll 0 0 #FFFFFF;
padding: 0;
margin: 0;
}
......
This diff is collapsed.
{% extends "base.html" %}
{% load i18n %}
{% block title %}{% trans "Application submitted" %}{% endblock %}
{% block content %}
<div align="center">
{% if pending %}
<h2>{% trans "Pending applications" %}</h2>
<table>
<tr><th>{% trans "Hostname" %}</th><th>{% trans "User" %}</th><th>{% trans "Memory" %}</th><th>{% trans "vCPUs" %}</th><th>{% trans "Network" %}</th><th>{% trans "Filed" %}</th></tr>
{% for app in pending %}
<tr><td><a href="{% url application-review app.pk %}">{{ app.hostname }}</a></td><td>{{ app.applicant }}</td><td>{{ app.memory }}</td><td>{{ app.vcpus }}</td><td>{{ app.network|default_if_none:"&mdash;" }}</td><td>{{ app.filed|date }}</td></tr>
{% endfor %}
</table>
{% endif %}
<h2>{% trans "Completed applications" %}</h2>
<table>
<tr><th>{% trans "Hostname" %}</th><th>{% trans "User" %}</th><th>{% trans "Memory" %}</th><th>{% trans "vCPUs" %}</th><th>{% trans "Network" %}</th><th>{% trans "Filed" %}</th></tr>
{% for app in completed %}
<tr><td><a href="{% url application-review app.pk %}">{{ app.hostname }}</a></td><td>{{ app.applicant }}</td><td>{{ app.memory }}</td><td>{{ app.vcpus }}</td><td>{{ app.network|default_if_none:"&mdash;" }}</td><td>{{ app.filed|date }}</td></tr>
{% endfor %}
</table>
</div>
{% endblock %}
......@@ -256,11 +256,29 @@ div.roundbox, #portsacc, #id_comments{
</p>
</div>
</fieldset>
{% if user.is_superuser %}
<fieldset>
<legend>
{% trans "Admin Options" %}
</legend>
<div class="roundbox">
{{ form.applier.label_tag }}{{ form.applier }}
<br>
{% if form.applier.errors %}
<br>
<p class="error" style="clear:both;">
{{ form.applier.errors|join:", " }}
</p>
{% endif %}
</div>
</fieldset>
{% else %}
<input type="hidden" id="id_applier" name="applier" value="{{applier}}"/>
{% endif %}
<fieldset>
<legend>
{% trans "Rule Match Conditions" %}
</legend>
<input type="hidden" id="id_applier" name="applier" value="{{applier}}"/>
<div class="roundbox">
{{ form.source.label_tag }}{{ form.source }}<img src="/static/threat_source.png"/> {% if form.source.errors %}
<br>
......
......@@ -29,13 +29,14 @@
<div id="main">
<div id="header">
<a class="grnetlogo" href="{% url group-routes %}">
<img class="logoimg" src="/static/grnet_logo.png">
<img class="logoimg" src="/static/logo.png">
</a>
<div id="title">
<a href="{% url group-routes %}">Firewall on Demand</a>
</div>
<div class="loginform">
<div id="formcontent">
{% block menublock %}
{% if user.is_authenticated %}
<span class="topmenuuser">{% trans "Welcome" %} <strong>{{user}}</strong></span>
{% endif %}
......@@ -59,6 +60,7 @@
{% else %}
<span class="topmenuaction"><a href="{% url login %}">{% trans "Shibboleth Login" %}</a></span>
{% endif %}
{% endblock %}
</div>
</div>
......@@ -80,13 +82,9 @@
{% endblock %}
</div>
<div id="footer">
{% if user.is_authenticated %}
{% trans "If you have any questions or need help, contact GRNET Helpdesk at <a href='mailto:helpdesk@grnet.gr'>helpdesk@grnet.gr</a> or 800-11-47638." %}<br />
{% endif %}
<a href="http://www.grnet.gr">{% trans "GRNET" %} NOC</a> | <a href="{% url getinfo %}">{% trans "Info" %}</a> | <a href="{% url gettos %}">{% trans "Service Terms" %}</a>
</div>
{% block footerblock %}
{% include "footer.html" %}
{% endblock %}
</div>
</body>
</html>
{% extends "base.html" %}
{% load i18n %}
<html>
<head>
<title>{% if error %}{% if inactive %}{% trans "Activation Pending" %}{% else %}{% trans "Error" %}{% endif %}{% endif %}</title>
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="-1">
<script src="/static/js/jquery.min.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="/static/css/base.css">
<link rel="stylesheet" type="text/css" href="/static/css/smoothness/jquery-ui-1.8.13.custom.css">
<script type="text/javascript" src="/static/js/jquery-ui-1.8.12.custom.min.js"></script>
<script type="text/javascript" src="/static/js/jquery.tooltip.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$(".relogin").tooltip({ position: "bottom center", opacity: 0.7});
});
</script>
<style type="text/css">
{% block title %}{% if error %}{% if inactive %}{% trans "Activation Pending" %}{% else %}{% trans "Error" %}{% endif %}{% endif %}{% endblock %}
{% block extrahead %}
<script type="text/javascript">
$(document).ready(function(){
$(".relogin").tooltip({ position: "bottom center", opacity: 0.7});
});
</script>
<style type="text/css">
.tooltip {
display: none;
background: transparent url(/static/black_arrow_updown.png);
font-size: 12px;
height: 70px;
width: 160px;
padding: 25px;
padding-top: 30px;
color: #fff;
}
.tooltip {
display: none;
background: transparent url(/static/black_arrow_updown.png);
font-size: 12px;
height: 70px;
width: 160px;
padding: 25px;
padding-top: 30px;
color: #fff;
}
</style>
<script type="text/javascript">
......@@ -37,87 +31,46 @@ $(document).ready(function(){
}
</script>
</head>
{% endblock %}
<body>
<div id="main">
<div id="header">
<a class="grnetlogo" href="{% url group-routes %}">
<img class="logoimg" src="/static/grnet_logo.png">
</a>
<div id="title">
<a href="{% url group-routes %}">Firewall on Demand</a>
</div>
<div class="loginform">
<div id="formcontent">
{% if user.is_authenticated %}
<span class="topmenuuser">{% trans "Welcome" %} <strong>{{user}}</strong></span>
{% endif %}
<span {% if user.is_authenticated %}class="topmenuaction"{% else %}class="topmenuuser"{% endif %} >
<form action="{% url django.views.i18n.set_language %}" method="post" style="display:inline;" id="langform">
{% csrf_token %}
<input name="next" type="hidden" value="{{ next }}" />
<input id="langsel" name="language" type="hidden" value="" />
{% for lang in LANGUAGES %}<a class="select_lang" href="#" onclick="setlang('{{ lang.0 }}'); return false;" title="{{lang.1}}">{% ifnotequal LANGUAGE_CODE lang.0 %}<font style="font-weight:normal;">{% endifnotequal %}{% trans lang.1 %}{% ifnotequal LANGUAGE_CODE lang.0 %}</font>{% endifnotequal %}</a>{% if not forloop.last %} -{% endif %}
{% endfor %}
</form>
</span>
{% if user.is_authenticated %}
<span class="topmenuaction"><a href="{% url user-profile %}">{% trans "My profile" %}</a></span>
{% if user.is_superuser %}
<span class="topmenuaction"><a href="{% url admin:index %}">{% trans "Admin" %}</a></span>
{% endif %}
<span class="topmenuaction"><a href="{% url logout %}">{% trans "Logout" %}</a></span>
{% else %}
<span class="topmenuaction relogin" title='{% trans "After clicking Retry Login, it is strongly suggested to close your browser and visit the page again" %}'><a href="{% url logout %}">{% trans "Retry Login" %}</a></span>
{% endif %}
</div>
</div>
</div>
<div id="content">
{% block brcrmb_container %}
<div class="info_content_title">{% if user.is_authenticated %}<a href="{% url group-routes %}">{% trans "My routes" %}</a>{% endif %}
{% block breadcrumbs %}{% endblock %}
</div>
{% endblock %}
{% block content %}
{% if error %}{% if inactive %}<h2>{% trans "Activation Pending" %}</h2>{% else %}<h2>{% trans "Error" %}</h2>{% endif %}{% endif %}
<div>
{% if missing_attributes %}
<p>{% trans "One or more required shibboleth attributes were not released towards this service" %}</p>
{% endif %}
<p {% if not inactive %}style="color: red;"{% endif %}>{% autoescape off %}{{error}}{% endautoescape %}</p>
{% if missing_attributes %}
<p>
{% trans "Required shibboleth attributes" %}:<br>
<ul>
<li>HTTP_EPPN</li>
<li>HTTP_SHIB_HOMEORGANIZATION</li>
<li>HTTP_SHIB_INETORGPERSON_MAIL</li>
<li>An appropriate HTTP_SHIB_EP_ENTITLEMENT</li>
</ul>
{% trans "Optional" %}:
<ul>
<li>HTTP_SHIB_INETORGPERSON_GIVENNAME</li>
<li>HTTP_SHIB_PERSON_SURNAME</li>
</ul>
</p>
{% endif %}
</div>
{% endblock %}
{% block menublock %}
{% if user.is_authenticated %}
<span class="topmenuuser">{% trans "Welcome" %} <strong>{{user}}</strong></span>
{% endif %}
{% if user.is_authenticated %}
<span class="topmenuaction"><a href="{% url user-profile %}">{% trans "My profile" %}</a></span>
{% if user.is_superuser %}
<span class="topmenuaction"><a href="{% url admin:index %}">{% trans "Admin" %}</a></span>
{% endif %}
<span class="topmenuaction"><a href="{% url logout %}">{% trans "Logout" %}</a></span>
{% else %}
<span class="topmenuaction relogin" title="After clicking Retry Login, it is strongly suggested to close your browser and visit the page again"><a href="{% url logout %}">{% trans "Retry Login" %}</a></span>
{% endif %}
{% endblock %}
</div>
<div id="footer">
{% if user.is_authenticated %}
{% trans "If you have any questions or need help, contact GRNET Helpdesk at <a href='mailto:helpdesk@grnet.gr'>helpdesk@grnet.gr</a> or 800-11-47638." %}<br />
{% endif %}
<a href="http://www.grnet.gr">{% trans "GRNET" %} NOC</a> | <a href="/about/info/">{% trans "Info" %}</a> | <a href="/about/terms-of-service">{% trans "Service Terms" %}</a>
</div>
{% block content %}
{% if error %}{% if inactive %}<h2>{% trans "Activation Pending" %}</h2>{% else %}<h2>{% trans "Error" %}</h2>{% endif %}{% endif %}
<div>
{% if missing_attributes %}
<p>{% trans "One or more required shibboleth attributes were not released towards this service" %}</p>
{% endif %}
<p {% if not inactive %}style="color: red;"{% endif %}>{% autoescape off %}{{error}}{% endautoescape %}</p>
{% if missing_attributes %}
<p>
{% trans "Required shibboleth attributes" %}:<br>
<ul>
<li>HTTP_EPPN</li>
<li>HTTP_SHIB_HOMEORGANIZATION</li>
<li>HTTP_SHIB_INETORGPERSON_MAIL</li>
<li>An appropriate HTTP_SHIB_EP_ENTITLEMENT</li>
</ul>
{% trans "Optional" %}:
<ul>
<li>HTTP_SHIB_INETORGPERSON_GIVENNAME</li>
<li>HTTP_SHIB_PERSON_SURNAME</li>
</ul>
</p>
{% endif %}
</div>
</body>
</html>
{% endblock %}
{% load i18n %}
<div id="footer">
{% if user.is_authenticated %}
{% trans "If you have any questions or need help, contact GRNET Helpdesk at <a href='mailto:helpdesk@grnet.gr'>helpdesk@grnet.gr</a> or 800-11-47638." %}<br />
{% endif %}
<a href="http://www.grnet.gr">{% trans "GRNET" %} NOC</a> | <a href="{% url getinfo %}">{% trans "Info" %}</a> | <a href="{% url gettos %}">{% trans "Service Terms" %}</a>
<p style="text-align: center;"><img width="46" height="40" border="0" class="image image-img_assist_custom-46x40 " src="http://noc.grnet.gr/sites/default/files/images/image_PSSYGK.img_assist_custom-46x40.png" alt="Flag ΨΣ" title="Flag ΨΣ"> <img width="49" height="40" border="0" class="image image-img_assist_custom-49x40 " src="http://noc.grnet.gr/sites/default/files/images/image_EEflag.img_assist_custom-49x40.png" alt="EU flag" title="EU flag"> <img width="90" height="40" border="0" class="image image-img_assist_custom-90x40 " src="http://noc.grnet.gr/sites/default/files/images/image_YPDBMTH.img_assist_custom-90x40.png" alt="Flag ΥΠΔΒΜΘ" title="Flag ΥΠΔΒΜΘ"><img width="67" height="40" border="0" class="image image-img_assist_custom-67x40 " src="http://noc.grnet.gr/sites/default/files/images/image_ESPA.img_assist_custom-67x40.png" alt="ESPA" title="ESPA"></p>
</div>
......@@ -2,6 +2,7 @@
{% load i18n %}
{% block title %}{% trans "My profile" %}{% endblock %}
{% block breadcrumbs %}:: {% trans "My profile" %}{% endblock %}
{% block content %}
<h3>{% trans "My profile" %}</h3>
......@@ -10,16 +11,25 @@
<strong>{% trans "First name" %}:</strong> {{user.first_name}} <br>
<strong>{% trans "Last name" %}:</strong> {{user.last_name}} <br>
<strong>{% trans "Email" %}:</strong> {{user.email}}<br>
<strong>{% trans "Organization" %}:</strong> {{peer}} <br>
<strong>{% trans "Admin Networks" %}:</strong> <br>
{% for network in peer.networks.all %}
{{network}}<br>
{% empty %}
<span style="color:red">{% blocktrans %}Ooops! Seems you have no networks associated with your peer. Contact Helpdesk to resolve this issue.{% endblocktrans %}</span>
<br>
<strong>{% trans "My Networks" %}:</strong><br>
<table class="display">
<tr>
<th class="ui-state-default">{% trans "Organization" %}</th><th class="ui-state-default">{% trans "Networks" %}</th>
</tr>
{% for peer in peers %}
<tr class="gradeC {% if forloop.counter|divisibleby:2 %}even{% else %}odd{% endif %}">
<td>{{peer}} </td>
<td>
{% for network in peer.networks.all %}
{{network}}<br>
{% empty %}
<span style="color:red">{% blocktrans %}Ooops! Seems you have no networks associated with your peer. Contact Helpdesk to resolve this issue.{% endblocktrans %}</span>
{% endfor %}
</td></tr>
{% endfor %}
</table>
</div>
{% endblock %}
{% extends "base.html" %}
{% load i18n %}
{% block title %}{% trans "Review application" %} #{{ application.pk }}{% endblock %}
{% block content %}
<style type="text/css">
.comments {
font-style: italic;
max-width: 40em;
}
.notice {
text-align: center;
font-style: italic;
}
#review {
max-width: 50em;
margin-left: auto;
margin-right: auto;
}
</style>
<script>
function set_network(net){
$("#id_network").val(net);
}
</script>
<div align="center" id="review">
<h2>{% trans "Review application" %} #{{ application.pk }} {% trans "by" %} {{ application.applicant }}</h2>
<p>{% trans "Submitted" %} {{ application.filed|date }}</p>
{% if application.is_pending %}
<form method="POST" id="appform">
{% csrf_token %}
<fieldset>
<legend>{% trans "Instance information" %}</legend>
<table>
<tr><th>{{ appform.hostname.label_tag }}</th><td>{{ appform.hostname }}<span class="error">{{ appform.hostname.errors|join:", " }}</span></td></tr>
<tr><th>{{ appform.memory.label_tag }}</th><td>{{ appform.memory }}<span class="error">{{ appform.memory.errors|join:", " }}</span></td></tr>
<tr><th>{{ appform.vcpus.label_tag }}</th><td>{{ appform.vcpus }}<span class="error">{{ appform.vcpus.errors|join:", " }}</span></td></tr>
<tr><th>{{ appform.disk_size.label_tag }}</th><td>{{ appform.disk_size }}<span class="error">{{ appform.disk_size.errors|join:", " }}</span></td></tr>
<tr><th>{{ appform.organization.label_tag }}</th><td>{{ appform.organization }}<span class="error">{{ appform.organization.errors|join:", " }}</span></td></tr>
<tr><th>{{ appform.hosts_mail_server.label_tag }}</th><td>{{ appform.hosts_mail_server }}<span class="error">{{ appform.hosts_mail_server.errors|join:", " }}</span></td></tr>
<tr><th>{{ appform.operating_system.label_tag }}</th><td>{{ appform.operating_system }}<span class="error">{{ appform.operating_system.errors|join:", " }}</span></td></tr>
</table>
</fieldset>
{% if application.admin_contact_name %}
<fieldset>
<legend>{% trans "Administrative contact" %}</legend>
<table>
<tr><th>{% trans "Name" %}</th><td>{{ application.admin_contact_name }}</td></tr>
<tr><th>{% trans "Email" %}</th><td>{{ application.admin_contact_email }}</td></tr>
<tr><th>{% trans "Phone" %}</th><td>{{ application.admin_contact_phone }}</td></tr>
</table>
</fieldset>
{% endif %}
<fieldset>
<legend>{% trans "Comments" %}</legend>
<div class="comments">
{{ application.comments }}
</div>
</fieldset>
<fieldset>
<legend>{% trans "Placement" %}</legend>
{% if application.network %}
<div class="notice">
{% trans "The user has requested explicit network placement on" %} {{ application.network }} ({{ application.network.cluster.description }})
</div>
{% endif %}
<p>{% trans "Choose either a network, or a cluster from the quick list to use the cluster's default network." %}</p>
<p>{% trans "Network" %}: {{ appform.network }}</p>
{% if appform.network.errors %}
<p class="error">{{ appform.network.errors|join:", " }}</p>
{% endif %}
<p>{% for cl in fast_clusters %}<a href="#" onclick="set_network('{{ cl.get_default_network.pk }}');">{{ cl.description }} ({{ cl.slug }})</a> {% if not forloop.last %}| {% endif %}{% endfor %}</p>
</fieldset>
<fieldset>
<legend>{% trans "Decision" %}</legend>
<p>{% trans "Comments to the user" %}:</p>
{% if appform.admin_comments.errors %}
<p><span class="error">{{ appform.admin_comments.errors }}</span></p>
{% endif %}
<p>{{ appform.admin_comments }}</p>
<p><input type="submit" value="Accept" name="accept"/> <input type="submit" value="Reject" name="reject" /></p>
</legend>
</form>
{% else %}
<fieldset>
<legend>{% trans "Instance information" %}</legend>
<table>
<tr><th>{{ appform.hostname.label_tag }}</th><td>{{ application.hostname }}</td></tr>
<tr><th>{{ appform.memory.label_tag }}</th><td>{{ application.memory }}</td></tr>
<tr><th>{{ appform.vcpus.label_tag }}</th><td>{{ application.vcpus }}</td></tr>
<tr><th>{{ appform.disk_size.label_tag }}</th><td>{{ application.disk_size }}</td></tr>
<tr><th>{{ appform.organization.label_tag }}</th><td>{{ application.organization }}</td></tr>
<tr><th>{{ appform.hosts_mail_server.label_tag }}</th><td>{{ application.hosts_mail_server }}</td></tr>
<tr><th>{{ appform.operating_system.label_tag }}</th><td>{{ application.operating_system }}</td></tr>
</table>
</fieldset>
{% if application.admin_contact_name %}
<fieldset>
<legend>{% trans "Administrative contact" %}</legend>
<table>
<tr><th>{% trans "Name" %}</th><td>{{ application.admin_contact_name }}</td></tr>
<tr><th>{% trans "Email" %}</th><td>{{ application.admin_contact_email }}</td></tr>
<tr><th>{% trans "Phone" %}</th><td>{{ application.admin_contact_phone }}</td></tr>
</table>
</fieldset>
{% endif %}
<fieldset>
<legend>{% trans "Comments" %}</legend>
<div class="comments">
{{ application.comments }}
</div>
</fieldset>
<fieldset>
<legend>{% trans "Placement" %}</legend>
<p>{% trans "The instance has been placed on" %} {{ application.network }} ({{ application.cluster.description }})</p>
</fieldset>
{% endif %}
</div>
{% endblock %}
{% load tofqdn %}{% ifequal action 'expires' %}Rule {{route.name}} expires {% ifequal expiration_days 0 %}today{% else%}in {{expiration_days}} day{{ expiration_days|pluralize }}{% endifequal %}{% else %}A new rule {{action}} job has spawned
Peer: {{route.applier.get_profile.peer.peer_name}}
User {{route.applier.username}} requested the {{action}} of the following rule from address {{address}} {% if address|tofqdn %}({{address|tofqdn}}){% endif %}:
Rule name: {{route.name}}{% endifequal %}
Match Statements:
* Source Address: {{route.source}}
* Destination Address: {{route.destination}}
* Protocol: {% if route.protocol.all %}{% for protocol in route.protocol.all %}{{ protocol }}{% if not forloop.last %}, {% endif %}{% endfor %}{% else %}any{% endif %}
* Ports: {% if route.sourceport.all or route.destinationport.all %}Defined by source/destination ports{% else %}{% if route.port.all %}{% for port in route.port.all %}{{ port }}{% if not forloop.last %}, {% endif %}{% endfor %}{% else %}any{% endif %}{% endif %}
* Source Ports: {% if route.port.all %}same as ports{% else %}{% if route.sourceport.all %}{% for port in route.sourceport.all %}{{ port }}{% if not forloop.last %}, {% endif %}{% endfor %}{% else %}any{% endif %}{% endif %}
* Destination Ports: {% if route.port.all %}same as ports{% else %}{% if route.destinationport.all %}{% for port in route.destinationport.all %}{{ port }}{% if not forloop.last %}, {% endif %}{% endfor %}{% else %}any{% endif %}{% endif %}
Then Actions:
* Action:{% for then in route.then.all %}{{ then }}{% if not forloop.last %}, {% endif %}{% endfor %}
Comments: {% if route.comments %}{{route.comments}}{% else %}-{% endif %}
Expires: {% ifequal action 'removal' %}Now, removal requested{%else%}{{route.expires}}{% endifequal %}
Rule url: {{url}}
{% load tofqdn %}
A new rule creation job has spawned
Peer: {{route.applier.get_profile.peer.peer_name}}
User {{route.applier.username}} requested the application of the following rule from address {{address}} {% if address|tofqdn %}({{address|tofqdn}}){% endif %}:
Match
* Dst Addr:{{route.destination}}
* Src Addr: {{route.source}}
* Protocol:{% for protocol in route.protocol.all %}{{ protocol }}{% if not forloop.last %}, {% endif %}{% endfor %}
* Ports:{% for port in route.ports.all %}{{ port }}{% if not forloop.last %}, {% endif %}{% endfor %}
* Source Ports:{% for port in route.sourceport.all %}{{ port }}{% if not forloop.last %}, {% endif %}{% endfor %}
* Destination Ports:{% for port in route.destinationport.all %}{{ port }}{% if not forloop.last %}, {% endif %}{% endfor %}
*Then:{% for then in route.then.all %}{{ then }}{% if not forloop.last %}, {% endif %}{% endfor %}
{% load tofqdn %}
A new rule removal job has spawned
Peer: {{route.applier.get_profile.peer.peer_name}}
User {{route.applier.username}} requested the removal of the following rule from address {{address}} {% if address|tofqdn %}({{address|tofqdn}}){% endif %}:
Match
* Dst Addr:{{route.destination}}
* Src Addr: {{route.source}}
* Protocol:{% for protocol in route.protocol.all %}{{ protocol }}{% if not forloop.last %}, {% endif %}{% endfor %}
* Ports:{% for port in route.ports.all %}{{ port }}{% if not forloop.last %}, {% endif %}{% endfor %}
* Source Ports:{% for port in route.sourceport.all %}{{ port }}{% if not forloop.last %}, {% endif %}{% endfor %}
* Destination Ports:{% for port in route.destinationport.all %}{{ port }}{% if not forloop.last %}, {% endif %}{% endfor %}
*Then:{% for then in route.then.all %}{{ then }}{% if not forloop.last %}, {% endif %}{% endfor %}
{% load tofqdn %}
A new rule edit job has spawned
Peer: {{route.applier.get_profile.peer.peer_name}}
User {{route.applier.username}} requested the application of the following rule from address {{address}} {% if address|tofqdn %}({{address|tofqdn}}){% endif %}:
Match
* Dst Addr:{{route.destination}}
* Src Addr: {{route.source}}
* Protocol:{% for protocol in route.protocol.all %}{{ protocol }}{% if not forloop.last %}, {% endif %}{% endfor %}
* Ports:{% for port in route.ports.all %}{{ port }}{% if not forloop.last %}, {% endif %}{% endfor %}
* Source Ports:{% for port in route.sourceport.all %}{{ port }}{% if not forloop.last %}, {% endif %}{% endfor %}
* Destination Ports:{% for port in route.destinationport.all %}{{ port }}{% if not forloop.last %}, {% endif %}{% endfor %}
*Then:{% for then in route.then.all %}{{ then }}{% if not forloop.last %}, {% endif %}{% endfor %}
Rule {{route.name}} expires {% ifequal expiration_days 0 %}today{% else%}in {{expiration_days}} day{{ expiration_days|pluralize }}{% endifequal %}
Match
* Dst Addr:{{route.destination}}
* Src Addr: {{route.source}}
* Protocol:{% for protocol in route.protocol.all %}{{ protocol }}{% if not forloop.last %}, {% endif %}{% endfor %}
* Ports:{% for port in route.ports.all %}{{ port }}{% if not forloop.last %}, {% endif %}{% endfor %}
* Source Ports:{% for port in route.sourceport.all %}{{ port }}{% if not forloop.last %}, {% endif %}{% endfor %}
* Destination Ports:{% for port in route.destinationport.all %}{{ port }}{% if not forloop.last %}, {% endif %}{% endfor %}
*Then:{% for then in route.then.all %}{{ then }}{% if not forloop.last %}, {% endif %}{% endfor %}
Visit {{url}} to edit the rule.
<div id="sshkeys_placeholder">