Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

* Added few missing translations

* Interface and Devices are now ordered by descendant ID (last shown first)
* Added feature requested in #55 by @zioproto
  • Loading branch information...
commit aea027e7fefb6c11181ba682ae0d34599e3df4d1 1 parent 524410f
nemesisdesign authored
View
BIN  locale/it/LC_MESSAGES/django.mo
Binary file not shown
View
11 locale/it/LC_MESSAGES/django.po
@@ -971,4 +971,13 @@ msgid "Name used for DNS resolution. Example: eth0 becomes eth0.devicecname.node
msgstr "Nome usato per la risoluzione DNS. Esempio: eth0 diventa eth0.nomeapparato.nomenodo.dominio.org. Se lasciato vuoto viene utilizzato il tipo interfaccia come default."
msgid "Name used for DNS resolution. Example: grid1 becomes grid1.nodename.domain.org. If left empty device name is used as default."
-msgstr "Nome usato per la risoluzione DNS. Esempio: grid1 diventa grid1.nomenodo.dominio.org. Se lasciato vuoto viene utilizzato il nome dell'apparato come valore di default."
+msgstr "Nome usato per la risoluzione DNS. Esempio: grid1 diventa grid1.nomenodo.dominio.org. Se lasciato vuoto viene utilizzato il nome dell'apparato come valore di default."
+
+msgid "Wrong answer, try again"
+msgstr "Risposta antispam sbagliata, controlla in fondo."
+
+msgid "Invalid token"
+msgstr "Token non valido"
+
+msgid "CNAME for DNS resolution (leave empty to get a default value)"
+msgstr "CNAME per la risoluzione DNS (lasciando vuoto si ottiene il valore di default)"
View
6 math_captcha/forms.py
@@ -2,7 +2,7 @@
from fields import MathField
from util import encode, decode
import settings
-
+from django.utils.translation import ugettext_lazy as _
class NullWidget(forms.widgets.HiddenInput):
def render(self, *a, **kw):
@@ -27,9 +27,9 @@ def math_clean(form):
if encode(question) != form.cleaned_data['math_captcha_question']:
# security problem, hack attempt
- raise forms.ValidationError('Invalid token')
+ raise forms.ValidationError(_('Invalid token'))
if eval(question) != value:
- raise forms.ValidationError('Wrong answer, try again')
+ raise forms.ValidationError(_('Wrong answer, try again'))
class MathCaptchaModelForm(forms.ModelForm):
View
2  media/js/nodeshot.js
@@ -1753,7 +1753,7 @@ var nodeshot = {
var opacity = 0.5;
// if link color is yellow increase opacity
if(quality==2){
- opacity = 0.9;
+ opacity = 0.7;
}
// if link color is red decrease opacity
else if(quality==3){
View
2  nodeshot/admin.py
@@ -36,6 +36,7 @@ class DeviceAdmin(admin.ModelAdmin):
save_on_top = True
date_hierarchy = 'added'
inlines = [InterfaceInline, HnaInline]
+ ordering = ('-id',)
class InterfaceAdmin(admin.ModelAdmin):
form = InterfaceForm
@@ -44,6 +45,7 @@ class InterfaceAdmin(admin.ModelAdmin):
list_select_related = True
save_on_top = True
search_fields = ('ipv4_address', 'ipv6_address', 'mac_address', 'bssid', 'essid')
+ ordering = ('-id',)
class StatisticAdmin(admin.ModelAdmin):
list_display = ('date', 'active_nodes', 'hotspots', 'potential_nodes', 'links', 'km')
View
13 nodeshot/models.py
@@ -9,6 +9,7 @@
from django.template.defaultfilters import slugify
from nodeshot.utils import notify_admins, email_owners
from django.core.exceptions import ValidationError
+from django.db.models import permalink
# for UserProfile
from django.contrib.auth.models import User
@@ -255,6 +256,10 @@ def __unicode__(self):
class Meta:
verbose_name = _('Node')
verbose_name_plural = _('Nodes')
+
+ @permalink
+ def get_absolute_url(self):
+ return('nodeshot_select', None, {'slug': self.slug})
class Device(models.Model):
name = models.CharField(_('name'), max_length=50, unique=True)
@@ -284,6 +289,10 @@ class Meta:
unique_together = (('node', 'cname'),)
verbose_name = _('Device')
verbose_name_plural = _('Devices')
+
+ @permalink
+ def get_absolute_url(self):
+ return('nodeshot_select', None, {'slug': self.node.slug})
class Hna(models.Model):
device = models.ForeignKey(Device)
@@ -369,6 +378,10 @@ def save(self):
i = i+1
else:
super(Interface, self).save()
+
+ @permalink
+ def get_absolute_url(self):
+ return('nodeshot_select', None, {'slug': self.device.node.slug})
class Meta:
unique_together = (('device', 'cname'),)
Please sign in to comment.
Something went wrong with that request. Please try again.