* Modify flatpages to suit your needs
* Once Apache proxying and shibboleth modules are properly setup, login to the tool. If shibboleth SP is properly setup you should see a user pending activation message and an activation email should arrive at the NOTIFY_ADMIN_MAILS accounts.
+5. UPDATING:
+* from 0.9.1 to 0.9.2:
+ - Check diff between urls
+ - run ./manage.py migrate accounts (data migration for perms)
--- /dev/null
+# encoding: utf-8
+import datetime
+from south.db import db
+from south.v2 import SchemaMigration
+from django.db import models
+
+class Migration(SchemaMigration):
+
+ def forwards(self, orm):
+
+ # Adding model 'UserProfile'
+ db.create_table('accounts_userprofile', (
+ ('peer', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['peers.Peer'])),
+ ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
+ ('user', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['auth.User'], unique=True)),
+ ))
+ db.send_create_signal('accounts', ['UserProfile'])
+
+
+ def backwards(self, orm):
+
+ # Deleting model 'UserProfile'
+ db.delete_table('accounts_userprofile')
+
+
+ models = {
+ 'accounts.userprofile': {
+ 'Meta': {'object_name': 'UserProfile'},
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'peer': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['peers.Peer']"}),
+ 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'})
+ },
+ 'auth.group': {
+ 'Meta': {'object_name': 'Group'},
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
+ 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
+ },
+ 'auth.permission': {
+ 'Meta': {'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
+ 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
+ },
+ 'auth.user': {
+ 'Meta': {'object_name': 'User'},
+ 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
+ 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
+ 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
+ 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
+ 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
+ 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
+ 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
+ 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
+ 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'})
+ },
+ 'contenttypes.contenttype': {
+ 'Meta': {'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
+ 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
+ },
+ 'peers.peer': {
+ 'Meta': {'object_name': 'Peer', 'db_table': "u'peer'"},
+ 'domain_name': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'}),
+ 'networks': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['peers.PeerRange']", 'null': 'True', 'blank': 'True'}),
+ 'peer_as': ('django.db.models.fields.IntegerField', [], {}),
+ 'peer_id': ('django.db.models.fields.IntegerField', [], {'primary_key': 'True'}),
+ 'peer_name': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
+ 'peer_tag': ('django.db.models.fields.CharField', [], {'max_length': '64'}),
+ 'techc_emails': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['peers.TechcEmail']", 'null': 'True', 'blank': 'True'})
+ },
+ 'peers.peerrange': {
+ 'Meta': {'object_name': 'PeerRange', 'db_table': "u'peer_range'"},
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'network': ('django.db.models.fields.CharField', [], {'max_length': '128'})
+ },
+ 'peers.techcemail': {
+ 'Meta': {'object_name': 'TechcEmail', 'db_table': "'techc_email'"},
+ 'email': ('django.db.models.fields.CharField', [], {'max_length': '352', 'db_column': "'email'"}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'})
+ }
+ }
+
+ complete_apps = ['accounts']
--- /dev/null
+# encoding: utf-8
+import datetime
+from south.db import db
+from south.v2 import DataMigration
+from django.db import models
+
+class Migration(DataMigration):
+
+ def forwards(self, orm):
+ "Write your forwards methods here."
+ ct, created = orm['contenttypes.ContentType'].objects.get_or_create(
+ model='userprofile', app_label='accounts') # model must be lowercase!
+ perm, created = orm['auth.permission'].objects.get_or_create(
+ content_type=ct, codename='overview', defaults=dict(name=u'Can see registered users and rules'))
+
+ def backwards(self, orm):
+ "Write your backwards methods here."
+ ct, created = orm['contenttypes.ContentType'].objects.get_or_create(
+ model='userprofile', app_label='accounts') # model must be lowercase!
+ perm, created = orm['auth.permission'].objects.get_or_create(
+ content_type=ct, codename='overview')
+ perm.delete()
+
+ models = {
+ 'accounts.userprofile': {
+ 'Meta': {'object_name': 'UserProfile'},
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'peer': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['peers.Peer']"}),
+ 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'})
+ },
+ 'auth.group': {
+ 'Meta': {'object_name': 'Group'},
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
+ 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
+ },
+ 'auth.permission': {
+ 'Meta': {'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
+ 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
+ },
+ 'auth.user': {
+ 'Meta': {'object_name': 'User'},
+ 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
+ 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
+ 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
+ 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
+ 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
+ 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
+ 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
+ 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
+ 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'})
+ },
+ 'contenttypes.contenttype': {
+ 'Meta': {'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
+ 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
+ },
+ 'peers.peer': {
+ 'Meta': {'object_name': 'Peer', 'db_table': "u'peer'"},
+ 'domain_name': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'}),
+ 'networks': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['peers.PeerRange']", 'null': 'True', 'blank': 'True'}),
+ 'peer_as': ('django.db.models.fields.IntegerField', [], {}),
+ 'peer_id': ('django.db.models.fields.IntegerField', [], {'primary_key': 'True'}),
+ 'peer_name': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
+ 'peer_tag': ('django.db.models.fields.CharField', [], {'max_length': '64'}),
+ 'techc_emails': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['peers.TechcEmail']", 'null': 'True', 'blank': 'True'})
+ },
+ 'peers.peerrange': {
+ 'Meta': {'object_name': 'PeerRange', 'db_table': "u'peer_range'"},
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'network': ('django.db.models.fields.CharField', [], {'max_length': '128'})
+ },
+ 'peers.techcemail': {
+ 'Meta': {'object_name': 'TechcEmail', 'db_table': "'techc_email'"},
+ 'email': ('django.db.models.fields.CharField', [], {'max_length': '352', 'db_column': "'email'"}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'})
+ }
+ }
+
+ complete_apps = ['accounts']
user = models.OneToOneField(User)
peer = models.ForeignKey(Peer)
+ class Meta:
+ permissions = (
+ ("overview", "Can see registered users and rules"),
+ )
+
+
def __unicode__(self):
return "%s:%s" %(self.user.username, self.peer.peer_name)
form.fields['institution'] = forms.ModelChoiceField(queryset=Peer.objects.all(), empty_label=None)
return render_to_response('registration/select_institution.html', {'form': form}, context_instance=RequestContext(request))
+@never_cache
+def overview(request):
+ user = request.user
+ if user.is_authenticated():
+ if user.has_perm('accounts.overview'):
+ users = User.objects.all()
+ group_routes = Route.objects.all()
+ return render_to_response('overview/index.html', {'users': users, 'routes': group_routes},
+ context_instance=RequestContext(request))
+ else:
+ violation=True
+ return render_to_response('overview/index.html', {'violation': violation},
+ context_instance=RequestContext(request))
+ else:
+ return HttpResponseRedirect(reverse("altlogin"))
+
@login_required
@never_cache
def user_logout(request):
def lookupShibAttr(attrmap, requestMeta):
for attr in attrmap:
- if (attr in requestMeta) & (len(requestMeta[attr]) > 0):
- return requestMeta[attr]
- return ''
\ No newline at end of file
+ if (attr in requestMeta.keys()):
+ if len(requestMeta[attr]) > 0:
+ return requestMeta[attr]
+ return ''
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2013-01-25 18:20+0200\n"
+"POT-Creation-Date: 2013-01-30 02:39+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: Leonidas Poulopoulos <leopoul@grnet.gr>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
msgid "Port should be an integer"
msgstr "Η port θα πρέπει να είναι ένας ακέραιος αριθμός"
-#: flowspec/models.py:107 templates/apply.html:201
-#: templates/user_routes.html:250
+#: flowspec/models.py:107 templates/apply.html:207
+#: templates/user_routes.html:250 templates/overview/index.html:158
+#: templates/overview/index.html.py:183
msgid "Name"
msgstr "Όνομα"
msgid "Network address. Use address/CIDR notation"
msgstr "Διεύθυνση δικτύου/υποδικτύου. Χρησιμοποιήστε σύνταξη διεύθυνσης/CIDR"
-#: flowspec/models.py:109 templates/apply.html:237
+#: flowspec/models.py:109 templates/apply.html:243
msgid "Source Address"
msgstr "Διεύθυνση Πηγής"
-#: flowspec/models.py:110 templates/apply.html:287
+#: flowspec/models.py:110 templates/apply.html:293
msgid "Source Port"
msgstr "Port Πηγής"
-#: flowspec/models.py:111 templates/apply.html:250
+#: flowspec/models.py:111 templates/apply.html:256
msgid "Destination Address"
msgstr "Διεύθυνση Προορισμού"
-#: flowspec/models.py:112 templates/apply.html:302
+#: flowspec/models.py:112 templates/apply.html:308
msgid "Destination Port"
msgstr "Port Προορισμού"
-#: flowspec/models.py:113 templates/apply.html:292 templates/apply.html.py:307
-#: templates/apply.html:317 templates/apply.html.py:322
+#: flowspec/models.py:113 templates/apply.html:298 templates/apply.html.py:313
+#: templates/apply.html:323 templates/apply.html.py:328
msgid "Port"
msgstr ""
-#: flowspec/models.py:119 templates/apply.html:263
+#: flowspec/models.py:119 templates/apply.html:269
msgid "Protocol"
msgstr "Πρωτόκολλο"
-#: flowspec/models.py:121 templates/apply.html:345
-#: templates/user_routes.html:252
+#: flowspec/models.py:121 templates/apply.html:351
+#: templates/user_routes.html:252 templates/overview/index.html:185
msgid "Then"
msgstr "Ενέργειες"
#: flowspec/models.py:124 templates/user_routes.html:253
+#: templates/overview/index.html:159 templates/overview/index.html.py:186
msgid "Status"
msgstr "Κατάσταση"
-#: flowspec/models.py:127 templates/apply.html:366
-#: templates/user_routes.html:256
+#: flowspec/models.py:127 templates/apply.html:372
+#: templates/user_routes.html:256 templates/overview/index.html:189
msgid "Expires"
msgstr "Λήγει"
#: flowspec/models.py:128 templates/user_routes.html:257
+#: templates/overview/index.html:190
msgid "Response"
msgstr "Απόκριση Δικτύου"
-#: flowspec/models.py:129 templates/apply.html:382
+#: flowspec/models.py:129 templates/apply.html:388
msgid "Comments"
msgstr "Σχόλια"
msgid "Create new Rule"
msgstr "Δημιουργία νέου Φίλτρου"
-#: templates/apply.html:15 templates/apply.html.py:182
+#: templates/apply.html:15 templates/apply.html.py:188
msgid "Edit rule"
msgstr "Επεξεργασία φίλτρου"
msgid "Create rule"
msgstr "Δημιουργία φίλτρου"
-#: templates/apply.html:35 templates/apply.html.py:67
+#: templates/apply.html:41 templates/apply.html.py:73
msgid "Add"
msgstr "Προσθήκη"
-#: templates/apply.html:55 templates/apply.html.py:95
+#: templates/apply.html:61 templates/apply.html.py:101
#: templates/user_routes.html:34
msgid "Cancel"
msgstr "Άκυρο"
-#: templates/apply.html:183
+#: templates/apply.html:189
msgid "Apply for a new rule"
msgstr "Αίτηση δημιουργίας νέου φίλτρου"
-#: templates/apply.html:198
+#: templates/apply.html:204
msgid "Rule Basic Info"
msgstr "Βασικές Πληροφορίες Φίλτρου"
-#: templates/apply.html:216
+#: templates/apply.html:222
msgid "Admin Options"
msgstr "Επιλογές Διαχείρισης"
-#: templates/apply.html:219 templates/user_routes.html:255
+#: templates/apply.html:225 templates/user_routes.html:255
+#: templates/overview/index.html:188
msgid "Applier"
msgstr "Χρήστης"
-#: templates/apply.html:234
+#: templates/apply.html:240
msgid "Rule Match Conditions"
msgstr "Όροι ταύτισης φίλτρου"
-#: templates/apply.html:275
+#: templates/apply.html:281
msgid "Ports"
msgstr ""
-#: templates/apply.html:281
+#: templates/apply.html:287
msgid "Advanced Settings (Ports)"
msgstr "Προηγμένες Ρυθμίσεις (Ports)"
-#: templates/apply.html:285
+#: templates/apply.html:291
msgid ""
"Select source/destination port(s), or select common port(s) for both source/"
"destination"
msgstr ""
-#: templates/apply.html:342
+#: templates/apply.html:348
msgid "Rule Actions"
msgstr "Ενέργειες Φίλτρου"
-#: templates/apply.html:363
+#: templates/apply.html:369
msgid "Expiration"
msgstr "Λήξη"
-#: templates/apply.html:379
+#: templates/apply.html:385
msgid "Use/Comments"
msgstr "Χρήση/Σχόλια"
-#: templates/apply.html:384
+#: templates/apply.html:390
msgid ""
"Give a short description of the intended use of this rule, that justifies "
"the parameter selection above. Feel free to include any additional comments."
msgstr ""
-#: templates/apply.html:398 templates/registration/select_institution.html:37
+#: templates/apply.html:404 templates/registration/select_institution.html:37
msgid "Apply"
msgstr "Εφαρμογή"
-#: templates/apply.html:407
+#: templates/apply.html:413
msgid "Add new port"
msgstr "Νέα port"
-#: templates/base.html:59 templates/base.html.py:158
+#: templates/base.html:59 templates/base.html.py:164
msgid "Welcome"
msgstr "Καλωσήρθατε"
-#: templates/base.html:73 templates/base.html.py:102 templates/profile.html:4
+#: templates/base.html:73 templates/base.html.py:103 templates/profile.html:4
#: templates/profile.html.py:5 templates/profile.html:7
msgid "My profile"
msgstr "Το προφίλ μου"
-#: templates/base.html:75 templates/base.html.py:106
+#: templates/base.html:75 templates/base.html.py:112
msgid "Admin"
msgstr "Διαχειριστής"
-#: templates/base.html:77 templates/base.html.py:136
+#: templates/base.html:77 templates/base.html.py:142
msgid "Logout"
msgstr "Έξοδος"
-#: templates/base.html:80 templates/base.html.py:144
+#: templates/base.html:80 templates/base.html.py:150
msgid ""
"After clicking Retry Login, it is strongly suggested to close your browser "
"and visit the page again"
"Αφού επιλέξετε Επανάληψη Εισόδου κλείστε τον browser σας και επισκεφθείτε "
"ξανά τη σελίδα"
-#: templates/base.html:80 templates/base.html.py:144
+#: templates/base.html:80 templates/base.html.py:150
msgid "Retry Login"
msgstr "Επανάληψη Εισόδου"
-#: templates/base.html:82 templates/base.html.py:141 templates/base.html:147
+#: templates/base.html:82 templates/base.html.py:147 templates/base.html:153
#: templates/welcome.html:21
msgid "Shibboleth Login"
msgstr "Είσοδος με Shibboleth"
-#: templates/base.html:115
+#: templates/base.html:108 templates/overview/index.html:121
+msgid "Overview"
+msgstr "Επισκόπηση"
+
+#: templates/base.html:121
msgid "Language"
msgstr "Γλώσσα"
-#: templates/base.html:158 templates/user_routes.html:214
+#: templates/base.html:164 templates/user_routes.html:214
#: templates/user_routes.html.py:220
msgid "My rules"
msgstr "Τα φίλτρα μου"
msgid "Service Terms"
msgstr "Όροι Χρήσης"
-#: templates/profile.html:11
+#: templates/profile.html:11 templates/overview/index.html:156
msgid "Username"
msgstr ""
msgid "Last name"
msgstr "Επώνυμο"
-#: templates/profile.html:23
+#: templates/profile.html:23 templates/overview/index.html:157
msgid "Email"
msgstr ""
msgid "Suspend"
msgstr "Κατάργηση"
-#: templates/user_routes.html:124
+#: templates/user_routes.html:124 templates/overview/index.html:43
+#: templates/overview/index.html.py:97
msgid "Display"
msgstr "Προβολή"
-#: templates/user_routes.html:124
+#: templates/user_routes.html:124 templates/overview/index.html:43
+#: templates/overview/index.html.py:97
msgid "All"
msgstr "όλων των"
-#: templates/user_routes.html:124
+#: templates/user_routes.html:124 templates/overview/index.html:97
msgid "rules"
msgstr "φίλτρων"
-#: templates/user_routes.html:126
+#: templates/user_routes.html:126 templates/overview/index.html:45
+#: templates/overview/index.html.py:99
msgid "No records to display"
msgstr "Δεν βρέθηκαν εγγραφές"
-#: templates/user_routes.html:128
+#: templates/user_routes.html:128 templates/overview/index.html:47
+#: templates/overview/index.html.py:101
msgid "Showing 0 to 0 of 0 entries"
msgstr "Δείχνοντας 0 εως 0 από 0 εγγραφές"
-#: templates/user_routes.html:131
+#: templates/user_routes.html:131 templates/overview/index.html:50
+#: templates/overview/index.html.py:104
msgid "Search:"
msgstr "Αναζήτηση:"
-#: templates/user_routes.html:134
+#: templates/user_routes.html:134 templates/overview/index.html:53
+#: templates/overview/index.html.py:107
msgid "First"
msgstr "Πρώτη"
-#: templates/user_routes.html:135
+#: templates/user_routes.html:135 templates/overview/index.html:54
+#: templates/overview/index.html.py:108
msgid "Previous"
msgstr "Προηγούμενη"
-#: templates/user_routes.html:136
+#: templates/user_routes.html:136 templates/overview/index.html:55
+#: templates/overview/index.html.py:109
msgid "Next"
msgstr "Επόμενη"
-#: templates/user_routes.html:137
+#: templates/user_routes.html:137 templates/overview/index.html:56
+#: templates/overview/index.html.py:110
msgid "Last"
msgstr "Τελευταία"
msgid "Add Rule"
msgstr "Δημιουργία φίλτρου"
-#: templates/user_routes.html:251
+#: templates/user_routes.html:251 templates/overview/index.html:184
msgid "Match"
msgstr "Όροι"
-#: templates/user_routes.html:254
+#: templates/user_routes.html:254 templates/overview/index.html:187
msgid "Details"
msgstr "Λεπτομέρειες"
msgstr "Ενέργειες"
#: templates/user_routes.html:295 templates/user_routes.html.py:309
+#: templates/overview/index.html:226 templates/overview/index.html.py:240
msgid "Suspended by user"
msgstr "Απενεργοποιήθηκε από το χρήστη"
#: templates/user_routes.html:298 templates/user_routes.html.py:309
+#: templates/overview/index.html:229 templates/overview/index.html.py:240
msgid "Suspended by administrator"
msgstr "Απενεργοποιήθηκε από το διαχειριστή"
-#: templates/user_routes.html:301
+#: templates/user_routes.html:301 templates/overview/index.html:232
msgid "Suspended due to expiration"
msgstr "Απενεργοποιήθηκε λόγω λήξης"
-#: templates/user_routes.html:304
+#: templates/user_routes.html:304 templates/overview/index.html:235
msgid "Syncronization error. Configuration in device deffers from rule"
msgstr "Σφάλμα συγχρονισμού. Διαφορά διαμόρφωσης από συσκευή"
-#: templates/user_routes.html:309
+#: templates/user_routes.html:309 templates/overview/index.html:240
msgid "Rule expired"
msgstr "Λήξη Φίλτρου"
"Για αντιμετώπιση σφαλμάτων και πληροφορίες, επικοινωνήστε με το Helpdesk του "
"ΕΔΕΤ"
+#: templates/overview/index.html:43
+msgid "users"
+msgstr "χρήστες"
+
+#: templates/overview/index.html:140
+msgid "Users - Rules"
+msgstr "Χρήστες - Φίλτρα"
+
+#: templates/overview/index.html:145
+msgid "Users"
+msgstr "Χρήστες"
+
+#: templates/overview/index.html:146
+msgid "Rules"
+msgstr "Φίλτρα"
+
+#: templates/overview/index.html:160
+msgid "Peer"
+msgstr "Φορέας"
+
+#: templates/overview/index.html:169
+msgid "Active"
+msgstr ""
+
+#: templates/overview/index.html:169
+msgid "Inactive"
+msgstr ""
+
+#: templates/overview/index.html:169
+msgid "Key Expired"
+msgstr ""
+
+#: templates/overview/login.html:3 templates/overview/login.html.py:14
+msgid "Overview Login"
+msgstr "Εισόδος στην Επισκόπηση"
+
#: templates/registration/activate.html:3
#: templates/registration/activation_complete.html:3
#: templates/registration/activation_complete.html:7
<ul class="nav">
{% if user.is_authenticated %}
+ {% if user.get_profile.peer %}
<li>
<a href="{% url user-profile %}">{% trans "My profile" %}</a>
</li>
+ {% endif %}
+
+ {% if perms.accounts.overview %}<li>
+ <a href="{% url overview %}">{% trans "Overview" %}</a>
+ </li>{% endif %}
{% if user.is_superuser %}
<li {% block hometop %}{% endblock %}>
<a href="{% url admin:index %}">{% trans "Admin" %}</a>
<footer class="footer">
<div id="footcontainer" class="container">
-
{% if user.is_authenticated %}
<p>{% 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." %}</p>
{% endif %}
- <div style="padding-top: 10px;">{% trans "Designed and developed by GRNET NOC" %}</div>
+ <div style="padding-top: 10px;">{% trans "Designed and developed by GRNET NOC" %}
+ <a href="//facebook.com/noc.grnet.gr" target="_blank"><img src="/fodstatic/img/facebook_img.png" alt="GRNET NOC on Facebook" title="GRNET NOC on Facebook"/></a> <a href="//twitter.com/grnetnoc" target="_blank"><img src="/fodstatic/img/twitter_img.png" alt="GRNET NOC on Twitter" title="GRNET NOC on Twitter"/></a>
+ </div>
<div class="row"><a href="http://noc.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></div>
<div style="padding-top: 10px;">
- <a href="//facebook.com/noc.grnet.gr" target="_blank"><img src="/fodstatic/img/facebook_img.png" alt="GRNET NOC on Facebook" title="GRNET NOC on Facebook"/></a> <a href="//twitter.com/grnetnoc" target="_blank"><img src="/fodstatic/img/twitter_img.png" alt="GRNET NOC on Twitter" title="GRNET NOC on Twitter"/></a>
+
</div>
<div style="padding-top: 10px;">
<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>
--- /dev/null
+{% extends "base.html"%}
+{% load i18n %}
+
+{% load i18n %}
+{% block extrahead %}
+
+
+
+<script type="text/javascript" src="/fodstatic/js/jquery.dataTables.js"></script>
+<script type="text/javascript" src="/fodstatic/js/datatables_bootstrap.js"></script>
+
+<style>
+.tab-content {
+ overflow: visible;
+}
+</style>
+<script type="text/javascript">
+$(document).ready(function(){
+{% if users %}
+var oTableU = $('#usertable').dataTable({
+ "sPaginationType": "bootstrap",
+ "sDom": "<'row-fluid'<'span6'l><'span6'f>r>t<'row-fluid'<'span6'i><'span6'p>>",
+ "aoColumns": [{
+ "bSearchable": true,
+ "bSortable": true
+ }, {
+ "bSearchable": true,
+ "bSortable": true
+ }, {
+ "bSearchable": true,
+ "bSortable": true
+ }, {
+ "bSearchable": true,
+ "bSortable": true
+ }, {
+ "bSearchable": true,
+ "bSortable": true
+ }],
+ "aaSorting": [[0, 'desc']],
+ "iDisplayLength": 25,
+ "oSearch": {"bSmart": false, "bRegex":true},
+ "oLanguage": {
+ "sLengthMenu": '{% trans "Display" %} <select><option value="25">25</option><option value="50">50</option><option value="-1">{% trans "All" %}</option></select> {% trans "users" %}',
+ "sProcessing": "Processing...",
+ "sZeroRecords": '{% trans "No records to display" %}',
+ "sInfo": "Showing _START_ to _END_ of _TOTAL_ entries",
+ "sInfoEmpty": "{% trans "Showing 0 to 0 of 0 entries" %}",
+ "sInfoFiltered": "(filtered from _MAX_ total entries)",
+ "sInfoPostFix": "",
+ "sSearch": '{% trans "Search:" %}',
+ "sUrl": "",
+ "oPaginate": {
+ "sFirst": '{% trans "First" %}',
+ "sPrevious": '{% trans "Previous" %}',
+ "sNext": '{% trans "Next" %}',
+ "sLast": '{% trans "Last" %}'
+ }
+ }
+});
+
+oTableU.fnDraw();
+{% endif %}
+{% if routes %}
+var oTableI = $('#routes_table').dataTable({
+ "sPaginationType": "bootstrap",
+ "sDom": "<'row-fluid'<'span6'l><'span6'f>r>t<'row-fluid'<'span6'i><'span6'p>>",
+ "aoColumns": [{
+ "bVisible": false,
+ "bSearchable": false,
+ "bSortable": false
+ }, {
+ "bSearchable": true,
+ "bSortable": true
+ }, {
+ "bSearchable": true,
+ "bSortable": true
+ }, {
+ "bSearchable": true,
+ "bSortable": true
+ }, {
+ "bSearchable": true,
+ "bSortable": true
+ }, {
+ "bSearchable": true,
+ "bSortable": true
+ }, {
+ "bSearchable": true,
+ "bSortable": true
+ }, {
+ "bSearchable": true,
+ "bSortable": true
+ }],
+ "aaSorting": [[0, 'desc']],
+ "iDisplayLength": 25,
+ "oSearch": {"bSmart": false, "bRegex":true},
+ "oLanguage": {
+ "sLengthMenu": '{% trans "Display" %} <select><option value="25">25</option><option value="50">50</option><option value="-1">{% trans "All" %}</option></select> {% trans "rules" %}',
+ "sProcessing": "Processing...",
+ "sZeroRecords": '{% trans "No records to display" %}',
+ "sInfo": "Showing _START_ to _END_ of _TOTAL_ entries",
+ "sInfoEmpty": "{% trans "Showing 0 to 0 of 0 entries" %}",
+ "sInfoFiltered": "(filtered from _MAX_ total entries)",
+ "sInfoPostFix": "",
+ "sSearch": '{% trans "Search:" %}',
+ "sUrl": "",
+ "oPaginate": {
+ "sFirst": '{% trans "First" %}',
+ "sPrevious": '{% trans "Previous" %}',
+ "sNext": '{% trans "Next" %}',
+ "sLast": '{% trans "Last" %}'
+ }
+ }
+ });
+
+oTableI.fnDraw();
+{% endif %}
+});
+</script>
+{% endblock %}
+{% block brcrmb_container %}
+<ul class="breadcrumb"><li><a href="{% url overview %}">{% trans "Overview" %}</a></li>
+ </ul>
+{% endblock %}
+{% block content %}
+<div class="container-fluid">
+ <div class="row-fluid">
+
+ </div>
+ <div class="row-fluid">
+ <div class="span12">
+ <div class="row-fluid">
+ <!--/span-->
+ <div class="span12">
+ {% if violation %}
+ <table class="table table-condensed">
+ <tr class="error"><td>You have no rights to access this area. Please contact your administrator<td></tr>
+ </table>
+ {% else %}
+ {% block subcontent %}
+ <h4>{% trans "Users - Rules" %}</h4>
+ <hr>
+
+
+ <ul class="nav nav-tabs">
+ <li class="active"><a href="#users" data-toggle="tab">{% trans "Users" %}</a></li>
+ <li><a href="#routes" data-toggle="tab">{% trans "Rules" %}</a></li>
+ </ul>
+
+ <div class="tab-content">
+
+ <div class="tab-pane active" id="users">
+ {% if users %}
+ <table cellpadding="0" cellspacing="0" border="0" class="table table-striped table-bordered" width="100%" id="usertable">
+ <thead>
+ <tr>
+ <th>{% trans "Username" %}</th>
+ <th>{% trans "Email" %}</th>
+ <th>{% trans "Name" %}</th>
+ <th>{% trans "Status" %}</th>
+ <th>{% trans "Peer" %}</th>
+ </tr>
+ </thead>
+ <tbody>
+ {% for user in users %}
+ <tr class="GradeC">
+ <td>{{user.username}}</td>
+ <td>{{user.email}}</td>
+ <td>{{user.first_name}} {{user.last_name}}</td>
+ <td>{% if user.registrationprofile_set.all %}{% if user.registrationprofile_set.all.0.activation_key == "ALREADY_ACTIVATED" %}{% trans "Active" %}{% else %}{% trans "Inactive" %} or {% trans "Key Expired" %}{% endif %}{% else %}-{% endif %}</td>
+ <td>{% if user.get_profile.peer %}{{user.get_profile.peer}}{% endif %}</td>
+ </tr>
+ {% endfor %}
+ </tbody>
+ </table>
+ {% endif %}
+ </div>
+ <div class="tab-pane" id="routes">
+ {% if routes %}
+ <table cellpadding="0" cellspacing="0" border="0" class="table table-striped table-bordered" width="100%" id="routes_table">
+ <thead>
+<tr>
+ <th>Id</th>
+ <th>{% trans "Name" %}</th>
+ <th>{% trans "Match" %}</th>
+ <th style="text-align: center;">{% trans "Then" %}</th>
+ <th style="text-align: center; ">{% trans "Status" %}</th>
+ {% comment %}<th style="text-align: center;">{% trans "Details" %}</th>{% endcomment %}
+ <th style="text-align: center;">{% trans "Applier" %}</th>
+ <th style="text-align: center;">{% trans "Expires" %}</th>
+ <th style="text-align: center;">{% trans "Response" %}</th>
+</tr>
+</thead>
+
+<tbody>
+{% for route in routes %}
+
+<tr class="GradeC" >
+ <td>{{ route.pk }}</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'%}
+ {% 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' %}
+ {% trans 'Suspended by user' %}
+ {% else %}
+ {% ifequal route.status 'ADMININACTIVE' %}
+ {% trans 'Suspended by administrator' %}
+ {% else %}
+ {% ifequal route.status 'EXPIRED' %}
+ {% trans 'Suspended due to expiration' %}
+ {% else %}
+ {% ifequal route.status 'OUTOFSYNC' %}
+ {% trans 'Syncronization error. Configuration in device deffers from rule' %}
+ {% endifequal %}
+ {% endifequal %}
+ {% endifequal %}
+ {% endifequal %}"
+ {% 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>
+
+</tr>
+
+{% endfor %}
+</tbody>
+ </table>
+ {% endif %}
+ </div>
+ </div>
+
+ {% endblock %}
+ {% endif %}
+
+ </div><!--/span-->
+ <!--/span-->
+ </div><!--/row-->
+ </div><!--/span-->
+ </div><!--/row-->
+</div><!--/.fluid-container-->
+{% endblock %}
+
+
+
\ No newline at end of file
--- /dev/null
+{% extends "base.html" %}
+{% load i18n %}
+{% block title %}{% trans "Overview Login" %}{% 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 "Overview Login" %}</h3>
+ <hr>
+
+ <form class="form-horizontal" method="post"
+ action="{% url altlogin %}">
+
+ {% if form.non_field_errors %} {% for err in form.non_field_errors %}
+ <div class="control-group error ">
+ <div class="controls error">
+ <span style="color: #B94A48;">{{err}}</span>
+ </div>
+ </div>
+ {% endfor %} {% endif %} {% csrf_token %}
+ <div class="control-group {% if form.username.errors %} error {% endif %}">
+ <label class="control-label" for="id_username">Username</label>
+ <div class="controls">
+ {{ form.username }} {% if form.username.errors %} <span class="help-inline"> {{ form.username.errors|join:", "}} </span> {% endif %}
+ </div>
+ </div>
+ <div class="control-group {% if form.password.errors %} error {% endif %}">
+ <label class="control-label" for="id_password">Password</label>
+ <div class="controls">
+ {{ form.password }} {% if form.password.errors %} <span
+ class="help-inline"> {{ form.password.errors|join:", "}} </span> {% endif %}
+ </div>
+ </div>
+ <div class="control-group">
+ <div class="controls">
+ <button type="submit" class="btn">Sign in</button>
+ <input type="hidden" name="next" value="{% url overview %}" />
+ </div>
+ </div>
+ </form>
+ <!--/span-->
+ </div><!--/row-->
+ </div><!--/span-->
+
+ </div><!--/span-->
+ </div><!--/.fluid-container-->
+ {% endblock %}
+
{% block contentplaceholder %}
<div id="content" class="container">
<div class="hero-unit" style="text-align:center"><h2>GRNET - Firewall on Demand</h2>
- <p><img src="/fodstatic/img/fod_footer_logo.png" /></p>
+ <p>
+ <iframe width="640" height="360" src="https://www.youtube.com/embed/VZy7DG8sjSk?rel=0" frameborder="0" allowfullscreen></iframe>
+ </p>
+
<p>{% blocktrans %}Welcome to GRNET's FoD service.{% endblocktrans %}</p>
</div>
<div class="row-fluid">
<div class="span4 well"><h3>{% trans "What" %}?</h3><hr>
<p>{% blocktrans %}If you are new to the service, take some time to read the{% endblocktrans %} <a href="/fod/info/{{LANGUAGE_CODE}}/">{% trans "Service Description" %}</a></p>
<p>{% blocktrans %}Before asking why? take some time to look at the{% endblocktrans %} <a href="/fod/tos/{{LANGUAGE_CODE}}/">{% trans "Service Terms" %}</a></p>
+
</div>
<div class="span4 well"><h3>{% trans "How" %}?</h3><hr>
<p>{% blocktrans %}If you have properly set your Shibboleth attributes, you may proceed{% endblocktrans %}</p>
</div>
</div>
<div class="span4 well"><h3>{% trans "Help" %}?</h3><hr>
- {% blocktrans %}For troubleshooting info and remarks do not hesitate to contact GRNET's Helpdesk.{% endblocktrans %}</div>
+ <p>
+ <p>{% blocktrans %}For troubleshooting info and remarks do not hesitate to contact GRNET's Helpdesk.{% endblocktrans %}</p>
+ </p>
+ </div>
</div>
</div>
# Uncomment the next line to enable the admin:
(r'^fod/admin/', include(admin.site.urls)),
(r'^tinymce/', include('tinymce.urls')),
+
+
+ url(r'^fod/altlogin/?', 'django.contrib.auth.views.login', {'template_name': 'overview/login.html'}, name="altlogin"),
+ url(r'^fod/overview/?$', 'flowspy.flowspec.views.overview', name="overview"),
)