Commit 442e21b6 authored by Leonidas Poulopoulos's avatar Leonidas Poulopoulos

Brought back flatpages. Templates refinement

parent 356305bf
......@@ -435,12 +435,6 @@ def get_peer_techc_mails(user):
mail.extend(techmails_list)
return mail
def gettos(request):
return render_to_response('gettos.html', context_instance=RequestContext(request))
def getinfo(request):
return render_to_response('getinfo.html', context_instance=RequestContext(request))
def send_new_mail(subject, message, from_email, recipient_list, bcc_list):
return EmailMessage(subject, message, from_email, recipient_list, bcc_list).send()
The 'fixtures_manual.xml' file fills the site table along with the flatpages
Before running make sure you have set the default site name
Run from root folder:
./manage.py loaddata initial_data/fixtures_manual.xml
This diff is collapsed.
This diff is collapsed.
......@@ -121,8 +121,17 @@
<a href="{% url logout %}">{% trans "Logout" %}</a>
</li>
{% else %}
{% if error %}
{% if inactive %}
<li><a href="{% url login %}">{% trans "Shibboleth Login" %}</a></li>
{% else %}
<li>
<a id='ttip' data-placement="bottom" rel="tooltip" href="{% url logout %}" data-original-title="{% trans 'After clicking Retry Login, it is strongly suggested to close your browser and visit the page again' %}">{% trans "Retry Login" %}</a>
</li>{% endif %}
{% else %}
<li><a href="{% url login %}">{% trans "Shibboleth Login" %}</a></li>
{% endif %}
{% endif %}
</ul>
</div>
......
......@@ -6,51 +6,49 @@
{% block extrahead %}
<script type="text/javascript">
$(document).ready(function(){
$(".relogin").tooltip({ position: "bottom center", opacity: 0.7});
$("#ttip").tooltip();
});
</script>
<style type="text/css">
.tooltip {
display: none;
background: transparent url(/fodstatic/black_arrow_updown.png);
font-size: 12px;
height: 70px;
width: 160px;
padding: 25px;
padding-top: 30px;
color: #fff;
}
{% endblock %}
</style>
{% block content %}
<div class="container-fluid">
<div class="row-fluid">
<div class="span2">
</div><!--/span-->
{% endblock %}
<div class="span10">
<div class="row-fluid">
<!--/span-->
{% if error %}{% if inactive %}<h3 class="muted">{% trans "Activation Pending" %}</h3>{% else %}<h3 class="muted">{% trans "Error" %}</h3>{% endif %}{% endif %}
<hr><br>
<div class="span10 alert {% if missing_attributes %}alert-error{% else %}alert-info{% endif %}">
{% if missing_attributes %}
<p>{% trans "One or more required shibboleth attributes were not released towards this service" %}</p>
{% endif %}
<p>{% 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>
<!--/span-->
</div><!--/row-->
</div><!--/span-->
{% block content %}
{% if error %}{% if inactive %}<h3 class="muted">{% trans "Activation Pending" %}</h3>{% else %}<h3 class="muted">{% trans "Error" %}</h3>{% endif %}{% endif %}
<div class="container"><div class="row">
<div class="span8">
{% 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>
</div>
</div>
{% endblock %}
</div><!--/span-->
</div><!--/.fluid-container-->
{% endblock %}
{% extends "base.html" %}
{% load i18n %}
{% block title %}{{ flatpage.title }}{% endblock %}
{% block breadcrumbs %}:: {% trans flatpage.title %}{% endblock %}
{% block extrahead %}
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="-1">
<style type="text/css">
.headtitle {font-family: "Franklin Gothic Demi", "Franklin Gothic", "ITC Franklin Gothic", Arial, sans-serif; letter-spacing: -1px; }
</style>
<script type="text/javascript" src="/fodstatic/js/jquery.min.js"></script>
<script type="text/javascript">
{% block title %}{{ flatpage.title }}{% endblock %}
{% block breadcrumbs %}:: {% trans flatpage.title %}{% endblock %}
function setlang(lang) {
$("#langsel").val(lang);
var form = $("#langform");
$.ajax({
url: form.attr('action'),
data: form.serialize(),
type: "POST",
cache: false,
success:function(data){
window.location.href=location.href + "../" + lang + "/";
}
});
}
</script>
{% block content %}
{{ flatpage.content|linebreaks }}
{% endblock %}
{% block content %}
<h4 class='muted'>{{ flatpage.title }}</h4>
<hr>
<div class="span9">
{{ flatpage.content|linebreaks }}
</div>
{% endblock %}
......@@ -5,7 +5,7 @@
{% 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>
<a href="http://www.grnet.gr">{% trans "GRNET" %} NOC</a> | <a href="/fod/info/{{LANGUAGE_CODE}}/">{% trans "Info" %}</a> | <a href="/fod/tos/{{LANGUAGE_CODE}}/">{% trans "Service Terms" %}</a>
<p style="text-align: center;"><img width="46" height="40" border="0" class="image image-img_assist_custom-46x40 " src="//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="//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="//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="//noc.grnet.gr/sites/default/files/images/image_ESPA.img_assist_custom-67x40.png" alt="ESPA" title="ESPA"></p>
</div>
</footer>
\ No newline at end of file
{% extends "base.html" %}
{% load i18n %}
{% block extrahead %}
<style type="text/css">
#console {
background: none repeat scroll 0 0 #36102a !important;
color: #edeae8 !important;
font-family: monospace !important;
}
.message {
font-family: monospace !important;
}
.tooltip {
display:none;
background:transparent url(/fodstatic/black_arrow.png);
font-size:12px;
height:70px;
width:160px;
padding:25px;
color:#fff;
}
</style>
{% endblock %}
{% block title %}{% trans "Info" %}{% endblock %}
{% block breadcrumbs %}<li class="active"><span class="divider">/</span>{% trans "Info" %}</li>{% endblock %}
{% block content %}
{% csrf_token %}
<div>
<h5>{% trans "Intro" %}</h5>
{% blocktrans %}Firewall on Demand service provides potential users (educational and academic community) the option to protect their networking equipment against network attacks and threats.
In particular, the service is targeted at network operators of GRNET's institutions who have needs for short-term protection against network attacks with destination, equipment they operate.
To ensure the integrity of the service and in order to prevent the service being a source of attacks, the authentication of users is done via Shibboleth. The authorisation is based on a combination of Shibboleth attributes with the address space that each organization manages.
The software chosen to implement the service is solely based on open source.
Requests or clarifications concerning the operation of the service should be submitted to GRNET Helpdesk via phone at 800-11-47638 or via e-mail to helpdesk-at-grnet.gr.
{% endblocktrans %}
<h5>{% trans "Joining the service" %}</h5>
{% blocktrans %}Joining the service requires the appropriate configuration of certain Shibboleth attributes{% endblocktrans %}:
<ul>
<li>HTTP_EPPN</li>
<li>HTTP_SHIB_HOMEORGANIZATION</li>
<li>HTTP_SHIB_INETORGPERSON_MAIL</li>
<li>{% blocktrans %}An appropriate HTTP_SHIB_EP_ENTITLEMENT which is provided by GRNET Helpdesk{% endblocktrans %}</li>
</ul>
{% trans "Optionally" %}:
<ul>
<li>HTTP_SHIB_INETORGPERSON_GIVENNAME</li>
<li>HTTP_SHIB_PERSON_SURNAME</li>
</ul>
<h5>{% trans "Use" %}</h5>
{% blocktrans %}The service enables users to mitigate active attacks aimed at their network equipment.
It is based on the creation of dynamic firewall filters that are applied to the network using the management protocol NETCONF and are propagated to compatible (Juniper) backbone network devices via BGP flowspec NLRI.
In order to properly complete the application for a new filter is essential that the destination address belongs to the user's administrative network. Currently attacks are limited per /29 subnet.
Requests for new filters are applied directly to the network and therefore users should pay extra attention in their request. Filters that have been applied to the network are removed after their expiry date, and users can activate then again by selecting the corresponding option.
Moreover, users are given the option for early deactivation of their requests.
{% endblocktrans %}
<h5>{% trans "Security" %}</h5>
{% blocktrans %}For security reasons, the submission of requests is monitored by the administrators of the service.
The service administrators may at any time remove active requests from the network, if this is deemed necessary{% endblocktrans %}
</div>
{% endblock %}
{% extends "base.html" %}
{% load i18n %}
{% block extrahead %}
<style type="text/css">
#console {
background: none repeat scroll 0 0 #36102a !important;
color: #edeae8 !important;
font-family: monospace !important;
}
.message {
font-family: monospace !important;
}
.tooltip {
display:none;
background:transparent url(/fodstatic/black_arrow.png);
font-size:12px;
height:70px;
width:160px;
padding:25px;
color:#fff;
}
</style>
{% endblock %}
{% block title %}{% trans "Terms of Service" %}{% endblock %}
{% block breadcrumbs %}<li class="active"><span class="divider">/</span>{% trans "Terms of Service" %}</li>{% endblock %}
{% block content %}
{% csrf_token %}
<div>
{% blocktrans %}The FoD service is provided by GRNET to the academic and research community and the use of the service should only be done to promote academic, educational and research purposes.
The following terms apply to all users of the service. These terms of use, as applicable, and each time amended, constitute the contract between the service users and GRNET.
To use the service, users are required to accept the following terms.{% endblocktrans %}
<h3>{% trans "Potential Users" %}</h3>
{% blocktrans %}The service is targeted at the Network Operation Centers (or similar structures) approved by the board of GRNET SA, participating in the federal identification using Shibboleth. The service is provided to mitigate network attacks aimed at network equipment. The entrance and use of the service requires proper configuration and release of specific Shibboleth attributes.{% endblocktrans %}
</div>
{% endblock %}
......@@ -2,13 +2,30 @@
{% load i18n %}
{% block title %}{% trans "Activation Complete" %}{% endblock %}
{% block brcrmb_container %}{% endblock %}
{% block content %}
<div align="center" id="registration">
<h3>{% trans "Activation Status" %}</h3>
{% if account %}
<p>{{account}} {% trans "succesfully activated" %}</p>
{% else %}
<p>{% trans "The user has probably been already activated." %}</p>
{% endif %}
</div>
{% endblock %}
{% block content %}
<div class="container-fluid">
<div class="row-fluid">
<div class="span2">
</div><!--/span-->
<div class="span10">
<div class="row-fluid">
<!--/span-->
<h3 class='muted'>{% trans "Activation Status" %}</h3>
<hr><br>
<div class="span10 alert {% if account %}alert-success{% else %}alert-info{% endif %}">
{% if account %}
{{account}} {% trans "succesfully activated" %}
{% else %}
{% trans "The user has probably been already activated." %}
{% endif %}
</div>
<!--/span-->
</div><!--/row-->
</div><!--/span-->
</div><!--/span-->
</div><!--/.fluid-container-->
{% endblock %}
......@@ -8,3 +8,24 @@
<p>{% trans "The user will be notified about his/her account activation" %}</p>
</div>
{% endblock %}
{% block content %}
<div class="container-fluid">
<div class="row-fluid">
<div class="span2">
</div><!--/span-->
<div class="span10">
<div class="row-fluid">
<!--/span-->
<h3>{% trans "Activation Complete" %}</h3>
<hr>
{% trans "The user will be notified about his/her account activation" %}
</div>
<!--/span-->
</div><!--/row-->
</div><!--/span-->
</div><!--/span-->
</div><!--/.fluid-container-->
{% endblock %}
\ No newline at end of file
......@@ -162,6 +162,8 @@ $(document).ready(function(){
if (reg_exp == '') {
reg_exp = '|'
}
oTable.fnFilter(reg_exp.slice(0, -1), 4, true);
......@@ -262,11 +264,31 @@ function delete_route(route){
<tr class="GradeC" >
<td>{{ route.pk }}</td>
<td><span {% if route.comments %} class="commentclass" style="border-bottom:1px dotted red;" title="{{route.comments}}" {% endif %}>{{ route.name }}</span></td>
<td {% if route.comments %}style="color: #0088CC;"{% endif %}>{% if route.comments %}<span rel="tooltip" data-placement="top" title="{{route.comments}}">{{ route.name }}</span>{% else %}{{ route.name }}{% endif %}</td>
<td>{{ route.get_match|safe|escape }}</td>
<td style="text-align: center;">{{route.get_then|safe|escape}}</td>
<td style="text-align: center; ">{% if route.status == 'EXPIRED' or route.status == 'ADMININACTIVE' or route.status == 'INACTIVE' or route.status == 'OUTOFSYNC'%}
<a href="#" rel="tooltip"
{% if route.status == 'EXPIRED' or route.status == 'ADMININACTIVE' or route.status == 'INACTIVE' %}SUSPENDED{% else %}{% if route.status == 'OUTOFSYNC' %}ERROR{% else %}{{route.status}}{% endif %}{% endif %}{% else %}{{route.status}}{% endif %}</td>
{% comment %}<td style="text-align: center;">{{ route.response }}</td>{% endcomment %}
<td style="text-align: center;">{{ route.applier }}</td>
<td style="text-align: center;" nowrap>
<span {% if route.status == 'EXPIRED' or route.status == 'ADMININACTIVE' or route.status == 'INACTIVE' or route.status == 'OUTOFSYNC'%}{% else %}{% if route.days_to_expire %}
data-placement="top"
rel = 'tooltip'
style="border-bottom:1px dashed red;"
title="Expires {% ifequal route.days_to_expire '0' %}today{% else%}in {{route.days_to_expire}} day{{ route.days_to_expire|pluralize }}{% endifequal %}"
{% endif %}{% endif %}>{{ route.expires|date:"d M y" }}</span></td>
<td style="text-align: center; {% if route.status == 'EXPIRED' %} color: #0088CC; {% endif %}">
{% if route.status == 'EXPIRED' %}
<span rel="tooltip"
{% if route.status == 'EXPIRED' or route.status == 'ADMININACTIVE' or route.status == 'INACTIVE' or route.status == 'OUTOFSYNC'%}
data-placement="top"
title = "{% ifequal route.status 'INACTIVE' %}
......@@ -284,17 +306,8 @@ function delete_route(route){
{% endifequal %}
{% endifequal %}
{% endifequal %}"
{% endif %}>{% if route.status == 'EXPIRED' or route.status == 'ADMININACTIVE' or route.status == 'INACTIVE' %}SUSPENDED{% else %}{% if route.status == 'OUTOFSYNC' %}ERROR{% else %}{{route.status}}{% endif %}{% endif %}</a>
{% else %}{{route.status}}{% endif %}</td>
{% comment %}<td style="text-align: center;">{{ route.response }}</td>{% endcomment %}
<td style="text-align: center;">{{ route.applier }}</td>
<td style="text-align: center;">
<span {% if route.status == 'EXPIRED' or route.status == 'ADMININACTIVE' or route.status == 'INACTIVE' or route.status == 'OUTOFSYNC'%}{% else %}{% if route.days_to_expire %}
class="expiresclass"
style="border-bottom:2px dashed red;"
title="Expires {% ifequal route.days_to_expire '0' %}today{% else%}in {{route.days_to_expire}} day{{ route.days_to_expire|pluralize }}{% endifequal %}"
{% endif %}{% endif %}>{{ route.expires }}</span></td>
<td style="text-align: center;">{% if route.status == 'EXPIRED' %}{% trans "Rule expired" %}{% else %}{% if route.status == 'ADMININACTIVE' %}{% trans "Suspended by administrator" %}{% else %}{% if route.status == 'INACTIVE' %}{% trans "Suspended by user" %}{% else %}{{ route.response }}{% if route.status == 'PENDING' %}<img src="/fodstatic/dots.gif">{% endif %}{% endif %}{% endif %}{% endif %}</td>
{% endif %}>{% trans "Rule expired" %}</span>{% else %}{% if route.status == 'ADMININACTIVE' %}{% trans "Suspended by administrator" %}{% else %}{% if route.status == 'INACTIVE' %}{% trans "Suspended by user" %}{% else %}{{ route.response }}{% if route.status == 'PENDING' %}<img src="/fodstatic/dots.gif">{% endif %}{% endif %}{% endif %}{% endif %}</td>
<td style="text-align: center; width:180px;">
{% ifequal route.status 'ACTIVE' %}
<a href="{% url edit-route route.name %}" class="edit_button btn btn-small" id="edit_button_{{route.pk}}">{% trans "Edit" %}</a>
......
......@@ -6,8 +6,9 @@
<div class="row">
<div class="span6">
<h3 class="muted">{% trans "Welcome" %}</h3>
<hr>
<p>{% blocktrans %}Welcome to GRNET's FoD service.{% endblocktrans %}</p>
<p>{% blocktrans %}If you are new to the service, take some time to read the service description{% endblocktrans %} <a href="{% url getinfo %}">{% trans "here" %}</a>.</p>
<p>{% blocktrans %}If you are new to the service, take some time to read the service description{% endblocktrans %} <a href="/fod/info/en">{% trans "here" %}</a>.</p>
<p>{% blocktrans %}If you have properly set your Shibboleth attributes, you can login using the link on the right{% endblocktrans %}</p>
<p>{% blocktrans %}For troubleshooting info and remarks do not hesitate to contact GRNET's Helpdesk.{% endblocktrans %}</p>
</div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment