Compare commits

..

No commits in common. "b02413c30ce12bd0fa7796767d6f723d3bd6e5c1" and "d10562e9fcd2354463dcf4be1782276588fbb962" have entirely different histories.

167 changed files with 3322 additions and 10226 deletions

View File

@ -98,6 +98,7 @@ test-3.13-core:
coverage_report: coverage_report:
coverage_format: cobertura coverage_format: cobertura
path: coverage.xml path: coverage.xml
allow_failure: true
test-3.10-all: test-3.10-all:
<<: *only-default <<: *only-default
@ -147,6 +148,7 @@ test-3.13-all:
coverage_report: coverage_report:
coverage_format: cobertura coverage_format: cobertura
path: coverage.xml path: coverage.xml
allow_failure: true
build-test: build-test:
stage: test stage: test

View File

@ -3,44 +3,18 @@
# Update this file: # Update this file:
# pre-commit autoupdate # pre-commit autoupdate
# Set the default language versions for the hooks
default_language_version:
python: python3 # Force all Python hooks to use Python 3
node: 22.12.0 # Force all Node hooks to use Node 22.12.0
# Globally exclude files
# https://pre-commit.com/#top_level-exclude
exclude: |
(?x)(
LICENSE|
allianceauth\/static\/allianceauth\/css\/themes\/bootstrap-locals.less|
\.min\.css|
\.min\.js|
\.po|
\.mo|
swagger\.json|
static/(.*)/libs/|
telnetlib\.py
)
repos: repos:
- repo: https://github.com/astral-sh/ruff-pre-commit - repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.11.0 rev: v0.8.1
hooks: hooks:
# Run the linter, and only the linter # Run the linter, and only the linter
- id: ruff - id: ruff
- repo: https://github.com/adamchainz/django-upgrade - repo: https://github.com/adamchainz/django-upgrade
rev: 1.23.1 rev: 1.22.2
hooks: hooks:
- id: django-upgrade - id: django-upgrade
args: [--target-version=5.1] args: [--target-version=4.2]
- repo: https://github.com/asottile/pyupgrade # Ruff doesnt get everything.
rev: v3.19.1
hooks:
- id: pyupgrade
args: [--py310-plus]
# Formatting # Formatting
- repo: https://github.com/pre-commit/pre-commit-hooks - repo: https://github.com/pre-commit/pre-commit-hooks
@ -59,9 +33,9 @@ repos:
- id: detect-private-key - id: detect-private-key
- id: check-case-conflict - id: check-case-conflict
# Python checks # Python checks
# # - id: check-docstring-first
- id: debug-statements - id: debug-statements
# - id: requirements-txt-fixer # - id: requirements-txt-fixer
- id: fix-encoding-pragma - id: fix-encoding-pragma
args: [--remove] args: [--remove]
- id: fix-byte-order-marker - id: fix-byte-order-marker
@ -70,33 +44,56 @@ repos:
args: [--fix=lf] args: [--fix=lf]
- id: trailing-whitespace - id: trailing-whitespace
args: [--markdown-linebreak-ext=md] args: [--markdown-linebreak-ext=md]
exclude: |
(?x)(
\.min\.css|
\.min\.js|
\.po|
\.mo|
swagger\.json
)
- id: check-executables-have-shebangs - id: check-executables-have-shebangs
- id: end-of-file-fixer - id: end-of-file-fixer
exclude: |
(?x)(
\.min\.css|
\.min\.js|
\.po|
\.mo|
swagger\.json
)
- repo: https://github.com/editorconfig-checker/editorconfig-checker.python - repo: https://github.com/editorconfig-checker/editorconfig-checker.python
rev: 3.2.0 rev: 3.0.3
hooks: hooks:
- id: editorconfig-checker - id: editorconfig-checker
exclude: |
(?x)(
LICENSE|
allianceauth\/static\/allianceauth\/css\/themes\/bootstrap-locals.less|
\.po|
\.mo|
swagger\.json
)
- repo: https://github.com/igorshubovych/markdownlint-cli - repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.44.0 rev: v0.43.0
hooks: hooks:
- id: markdownlint - id: markdownlint
language: node
args: args:
- --disable=MD013 - --disable=MD013
# Infrastructure # Infrastructure
- repo: https://github.com/tox-dev/pyproject-fmt - repo: https://github.com/tox-dev/pyproject-fmt
rev: v2.5.1 rev: v2.5.0
hooks: hooks:
- id: pyproject-fmt - id: pyproject-fmt
name: pyproject.toml formatter
description: "Format the pyproject.toml file."
args: args:
- --indent=4 - --indent=4
additional_dependencies: additional_dependencies:
- tox==4.24.1 # https://github.com/tox-dev/tox/releases/latest - tox==4.18.1 # https://github.com/tox-dev/tox/releases/latest
- repo: https://github.com/tox-dev/tox-ini-fmt
rev: 1.5.0
hooks:
- id: tox-ini-fmt
- repo: https://github.com/abravalheri/validate-pyproject - repo: https://github.com/abravalheri/validate-pyproject
rev: v0.24 rev: v0.23
hooks: hooks:
- id: validate-pyproject - id: validate-pyproject
name: Validate pyproject.toml
description: "Validate the pyproject.toml file."

View File

@ -5,7 +5,7 @@
[![django](https://img.shields.io/pypi/djversions/allianceauth?label=django)](https://pypi.org/project/allianceauth/) [![django](https://img.shields.io/pypi/djversions/allianceauth?label=django)](https://pypi.org/project/allianceauth/)
[![version](https://img.shields.io/pypi/v/allianceauth?label=release)](https://pypi.org/project/allianceauth/) [![version](https://img.shields.io/pypi/v/allianceauth?label=release)](https://pypi.org/project/allianceauth/)
[![pipeline status](https://gitlab.com/allianceauth/allianceauth/badges/master/pipeline.svg)](https://gitlab.com/allianceauth/allianceauth/commits/master) [![pipeline status](https://gitlab.com/allianceauth/allianceauth/badges/master/pipeline.svg)](https://gitlab.com/allianceauth/allianceauth/commits/master)
[![Documentation Status](https://readthedocs.org/projects/allianceauth/badge/?version=latest)](https://allianceauth.readthedocs.io/?badge=latest) [![Documentation Status](https://readthedocs.org/projects/allianceauth/badge/?version=latest)](http://allianceauth.readthedocs.io/?badge=latest)
[![coverage report](https://gitlab.com/allianceauth/allianceauth/badges/master/coverage.svg)](https://gitlab.com/allianceauth/allianceauth/commits/master) [![coverage report](https://gitlab.com/allianceauth/allianceauth/badges/master/coverage.svg)](https://gitlab.com/allianceauth/allianceauth/commits/master)
[![Chat on Discord](https://img.shields.io/discord/399006117012832262.svg)](https://discord.gg/fjnHAmk) [![Chat on Discord](https://img.shields.io/discord/399006117012832262.svg)](https://discord.gg/fjnHAmk)
@ -14,7 +14,7 @@ An auth system for EVE Online to help in-game organizations manage online servic
## Content ## Content
- [Overview](#overview) - [Overview](#overview)
- [Documentation](https://allianceauth.rtfd.io) - [Documentation](http://allianceauth.rtfd.io)
- [Support](#support) - [Support](#support)
- [Release Notes](https://gitlab.com/allianceauth/allianceauth/-/releases) - [Release Notes](https://gitlab.com/allianceauth/allianceauth/-/releases)
- [Developer Team](#development-team) - [Developer Team](#development-team)
@ -38,7 +38,7 @@ Main features:
- English :flag_gb:, Chinese :flag_cn:, German :flag_de:, Spanish :flag_es:, Korean :flag_kr:, Russian :flag_ru:, Italian :flag_it:, French :flag_fr:, Japanese :flag_jp: and Ukrainian :flag_ua: Localization - English :flag_gb:, Chinese :flag_cn:, German :flag_de:, Spanish :flag_es:, Korean :flag_kr:, Russian :flag_ru:, Italian :flag_it:, French :flag_fr:, Japanese :flag_jp: and Ukrainian :flag_ua: Localization
For further details about AA - including an installation guide and a full list of included services and plugin apps - please see the [official documentation](https://allianceauth.rtfd.io). For further details about AA - including an installation guide and a full list of included services and plugin apps - please see the [official documentation](http://allianceauth.rtfd.io).
## Screenshot ## Screenshot

View File

@ -5,7 +5,7 @@ manage online service access.
# This will make sure the app is always imported when # This will make sure the app is always imported when
# Django starts so that shared_task will use this app. # Django starts so that shared_task will use this app.
__version__ = '5.0.0a1' __version__ = '4.3.1'
__title__ = 'Alliance Auth' __title__ = 'Alliance Auth'
__url__ = 'https://gitlab.com/allianceauth/allianceauth' __url__ = 'https://gitlab.com/allianceauth/allianceauth'
NAME = f'{__title__} v{__version__}' NAME = f'{__title__} v{__version__}'

View File

@ -1,17 +1,15 @@
from solo.admin import SingletonModelAdmin
from django.contrib import admin from django.contrib import admin
from .models import AnalyticsIdentifier, AnalyticsTokens from .models import AnalyticsIdentifier, AnalyticsTokens
@admin.register(AnalyticsIdentifier) @admin.register(AnalyticsIdentifier)
class AnalyticsIdentifierAdmin(SingletonModelAdmin): class AnalyticsIdentifierAdmin(admin.ModelAdmin):
search_fields = ['identifier', ] search_fields = ['identifier', ]
list_display = ['identifier', ] list_display = ('identifier',)
@admin.register(AnalyticsTokens) @admin.register(AnalyticsTokens)
class AnalyticsTokensAdmin(admin.ModelAdmin): class AnalyticsTokensAdmin(admin.ModelAdmin):
search_fields = ['name', ] search_fields = ['name', ]
list_display = ['name', 'type', ] list_display = ('name', 'type',)

View File

@ -1,17 +0,0 @@
# Generated by Django 4.2.16 on 2024-12-11 02:17
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('analytics', '0009_remove_analyticstokens_ignore_paths_and_more'),
]
operations = [
migrations.AlterModelOptions(
name='analyticsidentifier',
options={'verbose_name': 'Analytics Identifier'},
),
]

View File

@ -1,21 +1,27 @@
from typing import Literal
from uuid import uuid4 from uuid import uuid4
from solo.models import SingletonModel from django.core.exceptions import ValidationError
from django.db import models from django.db import models
from django.utils.translation import gettext_lazy as _ from django.utils.translation import gettext_lazy as _
class AnalyticsIdentifier(SingletonModel): class AnalyticsIdentifier(models.Model):
identifier = models.UUIDField(default=uuid4, editable=False) identifier = models.UUIDField(
default=uuid4,
editable=False)
def __str__(self) -> Literal['Analytics Identifier']: def __str__(self) -> str:
return "Analytics Identifier" return f"{self.identifier}"
def save(self, *args, **kwargs):
if not self.pk and AnalyticsIdentifier.objects.exists():
# Force a single object
raise ValidationError('There is can be only one \
AnalyticsIdentifier instance')
self.pk = self.id = 1 # If this happens to be deleted and recreated, force it to be 1
return super().save(*args, **kwargs)
class Meta:
verbose_name = "Analytics Identifier"
class AnalyticsTokens(models.Model): class AnalyticsTokens(models.Model):

View File

@ -9,7 +9,7 @@ from django.conf import settings
from allianceauth import __version__ from allianceauth import __version__
from .models import AnalyticsIdentifier, AnalyticsTokens from .models import AnalyticsIdentifier, AnalyticsTokens
from .utils import existence_baremetal_or_docker, install_stat_addons, install_stat_tokens, install_stat_users from .utils import install_stat_addons, install_stat_tokens, install_stat_users
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
@ -67,8 +67,8 @@ def analytics_event(namespace: str,
value=value).apply_async(priority=9) value=value).apply_async(priority=9)
@shared_task @shared_task()
def analytics_daily_stats() -> None: def analytics_daily_stats():
"""Celery Task: Do not call directly """Celery Task: Do not call directly
Gathers a series of daily statistics Gathers a series of daily statistics
@ -77,7 +77,6 @@ def analytics_daily_stats() -> None:
users = install_stat_users() users = install_stat_users()
tokens = install_stat_tokens() tokens = install_stat_tokens()
addons = install_stat_addons() addons = install_stat_addons()
existence_type = existence_baremetal_or_docker()
logger.debug("Running Daily Analytics Upload") logger.debug("Running Daily Analytics Upload")
analytics_event(namespace='allianceauth.analytics', analytics_event(namespace='allianceauth.analytics',
@ -85,11 +84,6 @@ def analytics_daily_stats() -> None:
label='existence', label='existence',
value=1, value=1,
event_type='Stats') event_type='Stats')
analytics_event(namespace='allianceauth.analytics',
task='send_install_stats',
label=existence_type,
value=1,
event_type='Stats')
analytics_event(namespace='allianceauth.analytics', analytics_event(namespace='allianceauth.analytics',
task='send_install_stats', task='send_install_stats',
label='users', label='users',
@ -105,6 +99,7 @@ def analytics_daily_stats() -> None:
label='addons', label='addons',
value=addons, value=addons,
event_type='Stats') event_type='Stats')
for appconfig in apps.get_app_configs(): for appconfig in apps.get_app_configs():
if appconfig.label in [ if appconfig.label in [
"django_celery_beat", "django_celery_beat",
@ -140,7 +135,7 @@ def analytics_daily_stats() -> None:
event_type='Stats') event_type='Stats')
@shared_task @shared_task()
def send_ga_tracking_celery_event( def send_ga_tracking_celery_event(
measurement_id: str, measurement_id: str,
secret: str, secret: str,
@ -170,7 +165,7 @@ def send_ga_tracking_celery_event(
} }
payload = { payload = {
'client_id': AnalyticsIdentifier.get_solo().identifier.hex, 'client_id': AnalyticsIdentifier.objects.get(id=1).identifier.hex,
"user_properties": { "user_properties": {
"allianceauth_version": { "allianceauth_version": {
"value": __version__ "value": __version__

View File

@ -1,5 +1,6 @@
from uuid import uuid4 from uuid import UUID, uuid4
from django.core.exceptions import ValidationError
from django.test.testcases import TestCase from django.test.testcases import TestCase
from allianceauth.analytics.models import AnalyticsIdentifier from allianceauth.analytics.models import AnalyticsIdentifier
@ -12,4 +13,14 @@ uuid_2 = "7aa6bd70701f44729af5e3095ff4b55c"
class TestAnalyticsIdentifier(TestCase): class TestAnalyticsIdentifier(TestCase):
def test_identifier_random(self): def test_identifier_random(self):
self.assertNotEqual(AnalyticsIdentifier.get_solo(), uuid4) self.assertNotEqual(AnalyticsIdentifier.objects.get(), uuid4)
def test_identifier_singular(self):
AnalyticsIdentifier.objects.all().delete()
AnalyticsIdentifier.objects.create(identifier=uuid_1)
# Yeah i have multiple asserts here, they all do the same thing
with self.assertRaises(ValidationError):
AnalyticsIdentifier.objects.create(identifier=uuid_2)
self.assertEqual(AnalyticsIdentifier.objects.count(), 1)
self.assertEqual(AnalyticsIdentifier.objects.get(
pk=1).identifier, UUID(uuid_1))

View File

@ -1,5 +1,3 @@
import os
from django.apps import apps from django.apps import apps
from esi.models import Token from esi.models import Token
@ -38,16 +36,3 @@ def install_stat_addons() -> int:
The Number of Installed Apps""" The Number of Installed Apps"""
addons = len(list(apps.get_app_configs())) addons = len(list(apps.get_app_configs()))
return addons return addons
def existence_baremetal_or_docker() -> str:
"""Checks the Installation Type of an install
Returns
-------
str
existence_baremetal or existence_docker"""
docker_tag = os.getenv('AA_DOCKER_TAG')
if docker_tag:
return "existence_docker"
return "existence_baremetal"

View File

@ -32,7 +32,7 @@ class State(models.Model):
class Meta: class Meta:
ordering = ['-priority'] ordering = ['-priority']
def __str__(self) -> str: def __str__(self):
return self.name return self.name
def available_to_character(self, character): def available_to_character(self, character):
@ -126,7 +126,7 @@ class UserProfile(models.Model):
self.save(update_fields=['state']) self.save(update_fields=['state'])
notify( notify(
self.user, self.user,
_(f'State changed to: {state}'), _('State changed to: {}'.format(state)),
_('Your user\'s state is now: %(state)s') _('Your user\'s state is now: %(state)s')
% ({'state': state}), % ({'state': state}),
'info' 'info'
@ -153,7 +153,7 @@ class CharacterOwnership(models.Model):
class Meta: class Meta:
default_permissions = ('change', 'delete') default_permissions = ('change', 'delete')
ordering = ['user', 'character__character_name'] ordering = ['user', 'character__character_name']
def __str__(self) -> str: def __str__(self):
return f"{self.user}: {self.character}" return f"{self.user}: {self.character}"
@ -166,5 +166,5 @@ class OwnershipRecord(models.Model):
class Meta: class Meta:
ordering = ['-created'] ordering = ['-created']
def __str__(self) -> str: def __str__(self):
return f"{self.user}: {self.character} on {self.created}" return f"{self.user}: {self.character} on {self.created}"

View File

@ -1,6 +1,5 @@
{% extends "allianceauth/base-bs5.html" %} {% extends "allianceauth/base-bs5.html" %}
{% load aa_i18n %}
{% load i18n %} {% load i18n %}
{% block page_title %} {% block page_title %}
@ -14,7 +13,7 @@
{% block content %} {% block content %}
<div> <div>
<p class="mb-3"> <p class="mb-3">
{% translate "This page is a best attempt, but backups or database logs can still contain your tokens. Always revoke tokens on https://developers.eveonline.com/authorized-apps where possible."|urlize %} {% translate "This page is a best attempt, but backups or database logs can still contain your tokens. Always revoke tokens on https://community.eveonline.com/support/third-party-applications/ where possible."|urlize %}
</p> </p>
<table class="table w-100" id="table_tokens"> <table class="table w-100" id="table_tokens">
@ -51,23 +50,20 @@
{% block extra_javascript %} {% block extra_javascript %}
{% include "bundles/datatables-js-bs5.html" %} {% include "bundles/datatables-js-bs5.html" %}
{% get_datatables_language_static LANGUAGE_CODE as DT_LANG_PATH %}
<script> <script>
$(document).ready(() => { $(document).ready(() => {
let grp = 2; let grp = 2;
$('#table_tokens').DataTable({ const table = $('#table_tokens').DataTable({
"language": {"url": '{{ DT_LANG_PATH }}'},
'columnDefs': [{orderable: false, targets: [0, 1]}, { 'columnDefs': [{orderable: false, targets: [0, 1]}, {
'visible': false, 'visible': false,
'targets': grp 'targets': grp
}], }],
'order': [[grp, 'asc']], 'order': [[grp, 'asc']],
'drawCallback': function (settings) { 'drawCallback': function (settings) {
const api = this.api(); var api = this.api();
const rows = api.rows({page: 'current'}).nodes(); var rows = api.rows({page: 'current'}).nodes();
let last = null; var last = null;
api.column(grp, {page: 'current'}) api.column(grp, {page: 'current'})
.data() .data()
.each((group, i) => { .each((group, i) => {

View File

@ -5,11 +5,11 @@
{% csrf_token %} {% csrf_token %}
<select class="form-select" onchange="this.form.submit()" class="form-control" id="lang-select" name="language"> <select class="form-select" onchange="this.form.submit()" class="form-control" id="lang-select" name="language">
{% get_available_languages as LANGUAGES %} {% get_language_info_list for LANGUAGES as languages %}
{% for lang_code, lang_name in LANGUAGES %} {% for language in languages %}
<option lang="{{ lang_code }}" value="{{ lang_code }}"{% if lang_code == LANGUAGE_CODE %} selected{% endif %}> <option lang="{{ language.code }}" value="{{ language.code }}"{% if language.code == LANGUAGE_CODE %} selected="selected"{% endif %}>
{{ lang_code|language_name_local|capfirst }} ({{ lang_code }}) {{ language.name_local|capfirst }} ({{ language.code }})
</option> </option>
{% endfor %} {% endfor %}
</select> </select>

View File

@ -29,7 +29,7 @@
</p> </p>
<p class="text-center"> <p class="text-center">
<a class="text-reset" href="https://developers.eveonline.com/authorized-apps" target="_blank" rel="noopener noreferrer"> <a class="text-reset" href="https://community.eveonline.com/support/third-party-applications/" target="_blank" rel="noopener noreferrer">
{% translate "Manage ESI Applications" %} {% translate "Manage ESI Applications" %}
</a> </a>
</p> </p>

View File

@ -1,3 +1,4 @@
from django.db.models.signals import post_save from django.db.models.signals import post_save
from django.test.testcases import TestCase from django.test.testcases import TestCase

View File

@ -175,9 +175,9 @@ def add_character(request, token):
if CharacterOwnership.objects.filter(character__character_id=token.character_id).filter( if CharacterOwnership.objects.filter(character__character_id=token.character_id).filter(
owner_hash=token.character_owner_hash).filter(user=request.user).exists(): owner_hash=token.character_owner_hash).filter(user=request.user).exists():
messages.success(request, _( messages.success(request, _(
f'Added {token.character_name} to your account.')) 'Added {name} to your account.'.format(name=token.character_name)))
else: else:
messages.error(request, _(f'Failed to add {token.character_name} to your account: they already have an account.')) messages.error(request, _('Failed to add {name} to your account: they already have an account.'.format(name=token.character_name)))
return redirect('authentication:dashboard') return redirect('authentication:dashboard')

View File

@ -1,8 +1,4 @@
""" import datetime
Django system checks for Alliance Auth
"""
from datetime import datetime, timezone
from sqlite3.dbapi2 import sqlite_version_info from sqlite3.dbapi2 import sqlite_version_info
from celery import current_app from celery import current_app
@ -11,6 +7,7 @@ from packaging.version import InvalidVersion, Version as Pep440Version
from django import db from django import db
from django.conf import settings from django.conf import settings
from django.core.checks import CheckMessage, Error, Warning, register from django.core.checks import CheckMessage, Error, Warning, register
from django.utils import timezone
from allianceauth.utils.cache import get_redis_client from allianceauth.utils.cache import get_redis_client
@ -22,415 +19,131 @@ B = Configuration
@register() @register()
def django_settings(app_configs, **kwargs) -> list[CheckMessage]: def django_settings(app_configs, **kwargs) -> list[CheckMessage]:
"""
Check that Django settings are correctly configured
:param app_configs:
:type app_configs:
:param kwargs:
:type kwargs:
:return:
:rtype:
"""
errors: list[CheckMessage] = [] errors: list[CheckMessage] = []
# Check for SITE_URL
if hasattr(settings, "SITE_URL"): if hasattr(settings, "SITE_URL"):
# Check if SITE_URL is empty if settings.SITE_URL[-1] == "/":
if settings.SITE_URL == "": errors.append(Warning("'SITE_URL' Has a trailing slash. This may lead to incorrect links being generated by Auth.", hint="", id="allianceauth.checks.B005"))
errors.append(
Error(
msg="'SITE_URL' is empty.",
hint="Make sure to set 'SITE_URL' to the URL of your Auth instance. (Without trailing slash)",
id="allianceauth.checks.B011",
)
)
# Check if SITE_URL has a trailing slash
elif settings.SITE_URL[-1] == "/":
errors.append(
Warning(
msg="'SITE_URL' has a trailing slash. This may lead to incorrect links being generated by Auth.",
hint="",
id="allianceauth.checks.B005",
)
)
# SITE_URL not found
else: else:
errors.append( errors.append(Error("No 'SITE_URL' found is settings. This may lead to incorrect links being generated by Auth or Errors in 3rd party modules.", hint="", id="allianceauth.checks.B006"))
Error(
msg="No 'SITE_URL' found is settings. This may lead to incorrect links being generated by Auth or Errors in 3rd party modules.",
hint="",
id="allianceauth.checks.B006",
)
)
# Check for CSRF_TRUSTED_ORIGINS
if hasattr(settings, "CSRF_TRUSTED_ORIGINS") and hasattr(settings, "SITE_URL"): if hasattr(settings, "CSRF_TRUSTED_ORIGINS") and hasattr(settings, "SITE_URL"):
# Check if SITE_URL is not in CSRF_TRUSTED_ORIGINS
if settings.SITE_URL not in settings.CSRF_TRUSTED_ORIGINS: if settings.SITE_URL not in settings.CSRF_TRUSTED_ORIGINS:
errors.append( errors.append(Warning("'SITE_URL' not found in 'CSRF_TRUSTED_ORIGINS'. Auth may not load pages correctly until this is rectified.", hint="", id="allianceauth.checks.B007"))
Warning(
msg="'SITE_URL' not found in 'CSRF_TRUSTED_ORIGINS'. Auth may not load pages correctly until this is rectified.",
hint="",
id="allianceauth.checks.B007",
)
)
# CSRF_TRUSTED_ORIGINS not found
else: else:
errors.append( errors.append(Error("No 'CSRF_TRUSTED_ORIGINS' found is settings, Auth may not load pages correctly until this is rectified", hint="", id="allianceauth.checks.B008"))
Error(
msg="No 'CSRF_TRUSTED_ORIGINS' found is settings, Auth may not load pages correctly until this is rectified",
hint="",
id="allianceauth.checks.B008",
)
)
# Check for ESI_USER_CONTACT_EMAIL
if hasattr(settings, "ESI_USER_CONTACT_EMAIL"):
# Check if ESI_USER_CONTACT_EMAIL is empty
if settings.ESI_USER_CONTACT_EMAIL == "":
errors.append(
Error(
msg="'ESI_USER_CONTACT_EMAIL' is empty. A valid email is required as maintainer contact for CCP.",
hint="",
id="allianceauth.checks.B009",
)
)
# ESI_USER_CONTACT_EMAIL not found
else:
errors.append(
Error(
msg="No 'ESI_USER_CONTACT_EMAIL' found is settings. A valid email is required as maintainer contact for CCP.",
hint="",
id="allianceauth.checks.B010",
)
)
return errors return errors
@register() @register()
def system_package_redis(app_configs, **kwargs) -> list[CheckMessage]: def system_package_redis(app_configs, **kwargs) -> list[CheckMessage]:
"""
Check that Redis is a supported version
:param app_configs:
:type app_configs:
:param kwargs:
:type kwargs:
:return:
:rtype:
"""
allianceauth_redis_install_link = "https://allianceauth.readthedocs.io/en/latest/installation/allianceauth.html#redis-and-other-tools"
errors: list[CheckMessage] = [] errors: list[CheckMessage] = []
try: try:
redis_version = Pep440Version(get_redis_client().info()["redis_version"]) redis_version = Pep440Version(get_redis_client().info()['redis_version'])
except InvalidVersion: except InvalidVersion:
errors.append(Warning("Unable to confirm Redis Version")) errors.append(Warning("Unable to confirm Redis Version"))
return errors return errors
if redis_version.major == 7 and redis_version.minor == 4 and timezone.now() > timezone.datetime(year=2025, month=8, day=31, tzinfo=datetime.timezone.utc):
if ( errors.append(Warning(f"Redis {redis_version.public} in Security Support only, Updating Suggested", hint="https://allianceauth.readthedocs.io/en/latest/installation/allianceauth.html#redis-and-other-tools", id="allianceauth.checks.A001"))
redis_version.major == 7 elif redis_version.major == 7 and redis_version.minor == 2:
and redis_version.minor == 2 errors.append(Warning(f"Redis {redis_version.public} in Security Support only, Updating Suggested", hint="https://allianceauth.readthedocs.io/en/latest/installation/allianceauth.html#redis-and-other-tools", id="allianceauth.checks.A021"))
and datetime.now(timezone.utc)
> datetime(year=2025, month=8, day=31, tzinfo=timezone.utc)
):
errors.append(
Error(
msg=f"Redis {redis_version.public} in Security Support only, Updating Suggested",
hint=allianceauth_redis_install_link,
id="allianceauth.checks.A001",
)
)
elif redis_version.major == 7 and redis_version.minor == 0: elif redis_version.major == 7 and redis_version.minor == 0:
errors.append( errors.append(Error(f"Redis {redis_version.public} EOL", hint="https://allianceauth.readthedocs.io/en/latest/installation/allianceauth.html#redis-and-other-tools", id="allianceauth.checks.A019"))
Warning(
msg=f"Redis {redis_version.public} in Security Support only, Updating Suggested",
hint=allianceauth_redis_install_link,
id="allianceauth.checks.A002",
)
)
elif redis_version.major == 6 and redis_version.minor == 2: elif redis_version.major == 6 and redis_version.minor == 2:
errors.append( errors.append(Warning(f"Redis {redis_version.public} in Security Support only, Updating Suggested", hint="https://allianceauth.readthedocs.io/en/latest/installation/allianceauth.html#redis-and-other-tools", id="allianceauth.checks.A018"))
Warning(
msg=f"Redis {redis_version.public} in Security Support only, Updating Suggested",
hint=allianceauth_redis_install_link,
id="allianceauth.checks.A018",
)
)
elif redis_version.major in [6, 5]: elif redis_version.major in [6, 5]:
errors.append( errors.append(Error(f"Redis {redis_version.public} EOL", hint="https://allianceauth.readthedocs.io/en/latest/installation/allianceauth.html#redis-and-other-tools", id="allianceauth.checks.A003"))
Error(
msg=f"Redis {redis_version.public} EOL",
hint=allianceauth_redis_install_link,
id="allianceauth.checks.A003",
)
)
return errors return errors
@register() @register()
def system_package_mysql(app_configs, **kwargs) -> list[CheckMessage]: def system_package_mysql(app_configs, **kwargs) -> list[CheckMessage]:
"""
Check that MySQL is a supported version
:param app_configs:
:type app_configs:
:param kwargs:
:type kwargs:
:return:
:rtype:
"""
mysql_quick_guide_link = "https://dev.mysql.com/doc/mysql-apt-repo-quick-guide/en/"
errors: list[CheckMessage] = [] errors: list[CheckMessage] = []
for connection in db.connections.all(): for connection in db.connections.all():
if connection.vendor == "mysql": if connection.vendor == "mysql":
try: try:
mysql_version = Pep440Version( mysql_version = Pep440Version(".".join(str(i) for i in connection.mysql_version))
".".join(str(i) for i in connection.mysql_version)
)
except InvalidVersion: except InvalidVersion:
errors.append(Warning("Unable to confirm MySQL Version")) errors.append(Warning("Unable to confirm MySQL Version"))
return errors return errors
# MySQL 8 # MySQL 8
if mysql_version.major == 8: if mysql_version.major == 8 and mysql_version.minor == 4 and timezone.now() > timezone.datetime(year=2032, month=4, day=30, tzinfo=datetime.timezone.utc):
if mysql_version.minor == 4 and datetime.now(timezone.utc) > datetime( errors.append(Error(f"MySQL {mysql_version.public} EOL", hint="https://dev.mysql.com/doc/mysql-apt-repo-quick-guide/en/", id="allianceauth.checks.A004"))
year=2032, month=4, day=30, tzinfo=timezone.utc elif mysql_version.major == 8 and mysql_version.minor in [1, 2, 3]:
): errors.append(Error(f"MySQL {mysql_version.public} EOL", hint="https://dev.mysql.com/doc/mysql-apt-repo-quick-guide/en/", id="allianceauth.checks.A007"))
errors.append( elif mysql_version.major == 8 and mysql_version.minor == 0 and timezone.now() > timezone.datetime(year=2026, month=4, day=30, tzinfo=datetime.timezone.utc):
Error( errors.append(Error(f"MySQL {mysql_version.public} EOL", hint="https://dev.mysql.com/doc/mysql-apt-repo-quick-guide/en/", id="allianceauth.checks.A008"))
msg=f"MySQL {mysql_version.public} EOL", elif mysql_version.major < 8: # This will also catch Mariadb 5.x
hint=mysql_quick_guide_link, errors.append(Error(f"MySQL or MariaDB {mysql_version.public} EOL", hint="https://dev.mysql.com/doc/mysql-apt-repo-quick-guide/en/", id="allianceauth.checks.A009"))
id="allianceauth.checks.A004",
)
)
# Demote versions down here once EOL
elif mysql_version.minor in [1, 2, 3]:
errors.append(
Warning(
msg=f"MySQL {mysql_version.public} Non LTS",
hint=mysql_quick_guide_link,
id="allianceauth.checks.A005",
)
)
elif mysql_version.minor == 0 and datetime.now(timezone.utc) > datetime(
year=2026, month=4, day=30, tzinfo=timezone.utc
):
errors.append(
Error(
msg=f"MySQL {mysql_version.public} EOL",
hint=mysql_quick_guide_link,
id="allianceauth.checks.A008",
)
)
# MySQL below 8
# This will also catch Mariadb 5.x
elif mysql_version.major < 8:
errors.append(
Error(
msg=f"MySQL or MariaDB {mysql_version.public} EOL",
hint=mysql_quick_guide_link,
id="allianceauth.checks.A009",
)
)
return errors return errors
@register() @register()
def system_package_mariadb(app_configs, **kwargs) -> list[CheckMessage]: # noqa: C901 def system_package_mariadb(app_configs, **kwargs) -> list[CheckMessage]:
"""
Check that MariaDB is a supported version
"""
mariadb_download_link = "https://mariadb.org/download/?t=repo-config"
errors: list[CheckMessage] = [] errors: list[CheckMessage] = []
for connection in db.connections.all(): for connection in db.connections.all():
# TODO: Find a way to determine MySQL vs. MariaDB if connection.vendor == "mysql": # Still to find a way to determine MySQL vs MariaDB
if connection.vendor == "mysql":
try: try:
mariadb_version = Pep440Version( mariadb_version = Pep440Version(".".join(str(i) for i in connection.mysql_version))
".".join(str(i) for i in connection.mysql_version)
)
except InvalidVersion: except InvalidVersion:
errors.append(Warning("Unable to confirm MariaDB Version")) errors.append(Warning("Unable to confirm MariaDB Version"))
return errors return errors
# MariaDB 11 # MariaDB 11
if mariadb_version.major == 11: if mariadb_version.major == 11 and mariadb_version.minor == 4 and timezone.now() > timezone.datetime(year=2029, month=5, day=19, tzinfo=datetime.timezone.utc):
if mariadb_version.minor == 4 and datetime.now(timezone.utc) > datetime( errors.append(Error(f"MariaDB {mariadb_version.public} EOL", hint="https://mariadb.org/download/?t=repo-config", id="allianceauth.checks.A010"))
year=2029, month=5, day=19, tzinfo=timezone.utc elif mariadb_version.major == 11 and mariadb_version.minor in [0, 1, 2, 3, 5]: # Demote versions down here once EOL
): errors.append(Error(f"MariaDB {mariadb_version.public} EOL", hint="https://mariadb.org/download/?t=repo-config.", id="allianceauth.checks.A013"))
errors.append(
Error(
msg=f"MariaDB {mariadb_version.public} EOL",
hint=mariadb_download_link,
id="allianceauth.checks.A010",
)
)
# Demote versions down here once EOL
elif mariadb_version.minor in [0, 1, 2, 3, 5, 6]:
errors.append(
Error(
msg=f"MariaDB {mariadb_version.public} EOL",
hint=mariadb_download_link,
id="allianceauth.checks.A013",
)
)
# MariaDB 10 # MariaDB 10
elif mariadb_version.major == 10: elif mariadb_version.major == 10 and mariadb_version.minor == 11 and timezone.now() > timezone.datetime(year=2028, month=2, day=10, tzinfo=datetime.timezone.utc):
if mariadb_version.minor == 11 and datetime.now(timezone.utc) > datetime( errors.append(Error(f"MariaDB {mariadb_version.public} EOL", hint="https://mariadb.org/download/?t=repo-config.", id="allianceauth.checks.A014"))
year=2028, month=2, day=10, tzinfo=timezone.utc elif mariadb_version.major == 10 and mariadb_version.minor == 6 and timezone.now() > timezone.datetime(year=2026, month=7, day=6, tzinfo=datetime.timezone.utc):
): errors.append(Error(f"MariaDB {mariadb_version.public} EOL", hint="https://mariadb.org/download/?t=repo-config", id="allianceauth.checks.A0015"))
errors.append( elif mariadb_version.major == 10 and mariadb_version.minor == 5 and timezone.now() > timezone.datetime(year=2025, month=6, day=24, tzinfo=datetime.timezone.utc):
Error( errors.append(Error(f"MariaDB {mariadb_version.public} EOL", hint="https://mariadb.org/download/?t=repo-config", id="allianceauth.checks.A016"))
msg=f"MariaDB {mariadb_version.public} EOL", elif mariadb_version.major == 10 and mariadb_version.minor in [0, 1, 2, 3, 4, 7, 9, 10]: # Demote versions down here once EOL
hint=mariadb_download_link, errors.append(Error(f"MariaDB {mariadb_version.public} EOL", hint="https://mariadb.org/download/?t=repo-config", id="allianceauth.checks.A017"))
id="allianceauth.checks.A014",
)
)
elif mariadb_version.minor == 6 and datetime.now(timezone.utc) > datetime(
year=2026, month=7, day=6, tzinfo=timezone.utc
):
errors.append(
Error(
msg=f"MariaDB {mariadb_version.public} EOL",
hint=mariadb_download_link,
id="allianceauth.checks.A0015",
)
)
elif mariadb_version.minor == 5 and datetime.now(timezone.utc) > datetime(
year=2025, month=6, day=24, tzinfo=timezone.utc
):
errors.append(
Error(
msg=f"MariaDB {mariadb_version.public} EOL",
hint=mariadb_download_link,
id="allianceauth.checks.A016",
)
)
# Demote versions down here once EOL
elif mariadb_version.minor in [0, 1, 2, 3, 4, 7, 9, 10]:
errors.append(
Error(
msg=f"MariaDB {mariadb_version.public} EOL",
hint=mariadb_download_link,
id="allianceauth.checks.A017",
)
)
return errors return errors
@register() @register()
def system_package_sqlite(app_configs, **kwargs) -> list[CheckMessage]: def system_package_sqlite(app_configs, **kwargs) -> list[CheckMessage]:
"""
Check that SQLite is a supported version
:param app_configs:
:type app_configs:
:param kwargs:
:type kwargs:
:return:
:rtype:
"""
errors: list[CheckMessage] = [] errors: list[CheckMessage] = []
for connection in db.connections.all(): for connection in db.connections.all():
if connection.vendor == "sqlite": if connection.vendor == "sqlite":
try: try:
sqlite_version = Pep440Version( sqlite_version = Pep440Version(".".join(str(i) for i in sqlite_version_info))
".".join(str(i) for i in sqlite_version_info)
)
except InvalidVersion: except InvalidVersion:
errors.append(Warning("Unable to confirm SQLite Version")) errors.append(Warning("Unable to confirm SQLite Version"))
return errors return errors
if sqlite_version.major == 3 and sqlite_version.minor < 27: if sqlite_version.major == 3 and sqlite_version.minor < 27:
errors.append( errors.append(Error(f"SQLite {sqlite_version.public} Unsupported by Django", hint="https://pkgs.org/download/sqlite3", id="allianceauth.checks.A020"))
Error(
msg=f"SQLite {sqlite_version.public} Unsupported by Django",
hint="https://pkgs.org/download/sqlite3",
id="allianceauth.checks.A020",
)
)
return errors return errors
@register() @register()
def sql_settings(app_configs, **kwargs) -> list[CheckMessage]: def sql_settings(app_configs, **kwargs) -> list[CheckMessage]:
"""
Check that SQL settings are correctly configured
:param app_configs:
:type app_configs:
:param kwargs:
:type kwargs:
:return:
:rtype:
"""
errors: list[CheckMessage] = [] errors: list[CheckMessage] = []
for connection in db.connections.all(): for connection in db.connections.all():
if connection.vendor == "mysql": if connection.vendor == "mysql":
try: try:
if connection.settings_dict["OPTIONS"]["charset"] != "utf8mb4": if connection.settings_dict["OPTIONS"]["charset"] != "utf8mb4":
errors.append( errors.append(Error(f"SQL Charset is not set to utf8mb4 DB:{connection.alias}", hint="https://gitlab.com/allianceauth/allianceauth/-/commit/89be2456fb2d741b86417e889da9b6129525bec8", id="allianceauth.checks.B001"))
Error(
msg=f"SQL Charset is not set to utf8mb4 DB: {connection.alias}",
hint="https://gitlab.com/allianceauth/allianceauth/-/commit/89be2456fb2d741b86417e889da9b6129525bec8",
id="allianceauth.checks.B001",
)
)
except KeyError: except KeyError:
errors.append( errors.append(Error(f"SQL Charset is not set to utf8mb4 DB:{connection.alias}", hint="https://gitlab.com/allianceauth/allianceauth/-/commit/89be2456fb2d741b86417e889da9b6129525bec8", id="allianceauth.checks.B001"))
Error(
msg=f"SQL Charset is not set to utf8mb4 DB: {connection.alias}",
hint="https://gitlab.com/allianceauth/allianceauth/-/commit/89be2456fb2d741b86417e889da9b6129525bec8",
id="allianceauth.checks.B001",
)
)
# This hasn't actually been set on AA yet # This hasn't actually been set on AA yet
# try: # try:
# if ( # if connection.settings_dict["OPTIONS"]["collation"] != "utf8mb4_unicode_ci":
# connection.settings_dict["OPTIONS"]["collation"] # errors.append(Error(f"SQL Collation is not set to utf8mb4_unicode_ci DB:{connection.alias}", hint="https://gitlab.com/allianceauth/allianceauth/-/commit/89be2456fb2d741b86417e889da9b6129525bec8", id="allianceauth.checks.B001"))
# != "utf8mb4_unicode_ci"
# ):
# errors.append(
# Error(
# msg=f"SQL Collation is not set to utf8mb4_unicode_ci DB:{connection.alias}",
# hint="https://gitlab.com/allianceauth/allianceauth/-/commit/89be2456fb2d741b86417e889da9b6129525bec8",
# id="allianceauth.checks.B001",
# )
# )
# except KeyError: # except KeyError:
# errors.append( # errors.append(Error(f"SQL Collation is not set to utf8mb4_unicode_ci DB:{connection.alias}", hint="https://gitlab.com/allianceauth/allianceauth/-/commit/89be2456fb2d741b86417e889da9b6129525bec8", id="allianceauth.checks.B001"))
# Error(
# msg=f"SQL Collation is not set to utf8mb4_unicode_ci DB:{connection.alias}",
# hint="https://gitlab.com/allianceauth/allianceauth/-/commit/89be2456fb2d741b86417e889da9b6129525bec8",
# id="allianceauth.checks.B001",
# )
# )
# if connection.vendor == "sqlite": # if connection.vendor == "sqlite":
@ -439,57 +152,19 @@ def sql_settings(app_configs, **kwargs) -> list[CheckMessage]:
@register() @register()
def celery_settings(app_configs, **kwargs) -> list[CheckMessage]: def celery_settings(app_configs, **kwargs) -> list[CheckMessage]:
"""
Check that Celery settings are correctly configured
:param app_configs:
:type app_configs:
:param kwargs:
:type kwargs:
:return:
:rtype:
"""
errors: list[CheckMessage] = [] errors: list[CheckMessage] = []
try: try:
if current_app.conf.broker_transport_options != { if current_app.conf.broker_transport_options != {'priority_steps': [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], 'queue_order_strategy': 'priority'}:
"priority_steps": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], errors.append(Error("Celery Priorities are not set correctly", hint="https://gitlab.com/allianceauth/allianceauth/-/commit/8861ec0a61790eca0261f1adc1cc04ca5f243cbc", id="allianceauth.checks.B003"))
"queue_order_strategy": "priority",
}:
errors.append(
Error(
msg="Celery Priorities are not set correctly",
hint="https://gitlab.com/allianceauth/allianceauth/-/commit/8861ec0a61790eca0261f1adc1cc04ca5f243cbc",
id="allianceauth.checks.B003",
)
)
except KeyError: except KeyError:
errors.append( errors.append(Error("Celery Priorities are not set", hint="https://gitlab.com/allianceauth/allianceauth/-/commit/8861ec0a61790eca0261f1adc1cc04ca5f243cbc", id="allianceauth.checks.B003"))
Error(
msg="Celery Priorities are not set",
hint="https://gitlab.com/allianceauth/allianceauth/-/commit/8861ec0a61790eca0261f1adc1cc04ca5f243cbc",
id="allianceauth.checks.B003",
)
)
try: try:
if not current_app.conf.broker_connection_retry_on_startup: if current_app.conf.broker_connection_retry_on_startup is not True:
errors.append( errors.append(Error("Celery broker_connection_retry_on_startup not set correctly", hint="https://gitlab.com/allianceauth/allianceauth/-/commit/380c41400b535447839e5552df2410af35a75280", id="allianceauth.checks.B004"))
Error(
msg="Celery broker_connection_retry_on_startup not set correctly",
hint="https://gitlab.com/allianceauth/allianceauth/-/commit/380c41400b535447839e5552df2410af35a75280",
id="allianceauth.checks.B004",
)
)
except KeyError: except KeyError:
errors.append( errors.append(Error("Celery broker_connection_retry_on_startup not set", hint="https://gitlab.com/allianceauth/allianceauth/-/commit/380c41400b535447839e5552df2410af35a75280", id="allianceauth.checks.B004"))
Error(
msg="Celery broker_connection_retry_on_startup not set",
hint="https://gitlab.com/allianceauth/allianceauth/-/commit/380c41400b535447839e5552df2410af35a75280",
id="allianceauth.checks.B004",
)
)
return errors return errors

View File

@ -45,7 +45,7 @@ class CorpStats(models.Model):
def __str__(self) -> str: def __str__(self):
return f"{self.__class__.__name__} for {self.corp}" return f"{self.__class__.__name__} for {self.corp}"
def update(self): def update(self):
@ -154,7 +154,7 @@ class CorpMember(models.Model):
unique_together = ('corpstats', 'character_id') unique_together = ('corpstats', 'character_id')
ordering = ['character_name'] ordering = ['character_name']
def __str__(self) -> str: def __str__(self):
return self.character_name return self.character_name
@property @property

View File

@ -1,6 +1,5 @@
{% extends 'corputils/base.html' %} {% extends 'corputils/base.html' %}
{% load aa_i18n %}
{% load i18n %} {% load i18n %}
{% load humanize %} {% load humanize %}
@ -239,12 +238,9 @@
{% block extra_javascript %} {% block extra_javascript %}
{% include 'bundles/datatables-js-bs5.html' %} {% include 'bundles/datatables-js-bs5.html' %}
{% get_datatables_language_static LANGUAGE_CODE as DT_LANG_PATH %}
<script> <script>
$(document).ready(() => { $(document).ready(() => {
$('#table-mains').DataTable({ $('#table-mains').DataTable({
"language": {"url": '{{ DT_LANG_PATH }}'},
"columnDefs": [ "columnDefs": [
{ "sortable": false, "targets": [1] }, { "sortable": false, "targets": [1] },
], ],
@ -253,7 +249,6 @@
}); });
$('#table-members').DataTable({ $('#table-members').DataTable({
"language": {"url": '{{ DT_LANG_PATH }}'},
"columnDefs": [ "columnDefs": [
{ "searchable": false, "targets": [0, 2] }, { "searchable": false, "targets": [0, 2] },
{ "sortable": false, "targets": [0, 2] }, { "sortable": false, "targets": [0, 2] },
@ -264,7 +259,6 @@
}); });
$('#table-unregistered').DataTable({ $('#table-unregistered').DataTable({
"language": {"url": '{{ DT_LANG_PATH }}'},
"columnDefs": [ "columnDefs": [
{ "searchable": false, "targets": [0, 2] }, { "searchable": false, "targets": [0, 2] },
{ "sortable": false, "targets": [0, 2] }, { "sortable": false, "targets": [0, 2] },

View File

@ -1,6 +1,5 @@
{% extends "corputils/base.html" %} {% extends "corputils/base.html" %}
{% load aa_i18n %}
{% load i18n %} {% load i18n %}
{% block member_data %} {% block member_data %}
@ -43,12 +42,9 @@
{% block extra_javascript %} {% block extra_javascript %}
{% include 'bundles/datatables-js-bs5.html' %} {% include 'bundles/datatables-js-bs5.html' %}
{% get_datatables_language_static LANGUAGE_CODE as DT_LANG_PATH %}
<script> <script>
$(document).ready(() => { $(document).ready(() => {
$('#table-search').DataTable({ $('#table-search').DataTable({
"language": {"url": '{{ DT_LANG_PATH }}'},
"stateSave": true, "stateSave": true,
"stateDuration": 0 "stateDuration": 0
}); });

View File

@ -1,3 +0,0 @@
"""
Alliance Auth Crontab Utilities
"""

View File

@ -1,14 +0,0 @@
"""
Crontab App Config
"""
from django.apps import AppConfig
class CrontabConfig(AppConfig):
"""
Crontab App Config
"""
name = "allianceauth.crontab"
label = "crontab"

View File

@ -1,30 +0,0 @@
# Generated by Django 4.2.16 on 2025-01-20 06:16
from django.db import migrations, models
import allianceauth.crontab.models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='CronOffset',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('minute', models.FloatField(default=allianceauth.crontab.models.random_default, verbose_name='Minute Offset')),
('hour', models.FloatField(default=allianceauth.crontab.models.random_default, verbose_name='Hour Offset')),
('day_of_month', models.FloatField(default=allianceauth.crontab.models.random_default, verbose_name='Day of Month Offset')),
('month_of_year', models.FloatField(default=allianceauth.crontab.models.random_default, verbose_name='Month of Year Offset')),
('day_of_week', models.FloatField(default=allianceauth.crontab.models.random_default, verbose_name='Day of Week Offset')),
],
options={
'verbose_name': 'Cron Offsets',
},
),
]

View File

@ -1,25 +0,0 @@
from random import random
from solo.models import SingletonModel
from django.db import models
from django.utils.translation import gettext_lazy as _
def random_default() -> float:
return random()
class CronOffset(SingletonModel):
minute = models.FloatField(_("Minute Offset"), default=random_default)
hour = models.FloatField(_("Hour Offset"), default=random_default)
day_of_month = models.FloatField(_("Day of Month Offset"), default=random_default)
month_of_year = models.FloatField(_("Month of Year Offset"), default=random_default)
day_of_week = models.FloatField(_("Day of Week Offset"), default=random_default)
def __str__(self) -> str:
return "Cron Offsets"
class Meta:
verbose_name = "Cron Offsets"

View File

@ -1,68 +0,0 @@
from celery import schedules
from celery.utils.log import get_logger
from django_celery_beat.models import CrontabSchedule
from django_celery_beat.schedulers import DatabaseScheduler
from django.core.exceptions import ObjectDoesNotExist
from django.db.utils import OperationalError, ProgrammingError
from allianceauth.crontab.models import CronOffset
from allianceauth.crontab.utils import offset_cron
logger = get_logger(__name__)
class OffsetDatabaseScheduler(DatabaseScheduler):
"""
Customization of Django Celery Beat, Database Scheduler
Takes the Celery Schedule from local.py and applies our AA Framework Cron Offset, if apply_offset is true
Otherwise it passes it through as normal
"""
def __init__(self, *args, **kwargs) -> None:
super().__init__(*args, **kwargs)
def update_from_dict(self, mapping):
s = {}
try:
cron_offset = CronOffset.get_solo() # noqa: F841
except (OperationalError, ProgrammingError, ObjectDoesNotExist) as exc:
# This is just incase we haven't migrated yet or something
logger.warning(
"OffsetDatabaseScheduler: Could not fetch CronOffset (%r). "
"Defering to DatabaseScheduler",
exc
)
return super().update_from_dict(mapping)
for name, entry_fields in mapping.items():
try:
apply_offset = entry_fields.pop("apply_offset", False) # Ensure this pops before django tries to save to ORM
entry = self.Entry.from_entry(name, app=self.app, **entry_fields)
if apply_offset:
entry_fields.update({"apply_offset": apply_offset}) # Reapply this as its gets pulled from config inconsistently.
schedule_obj = entry.schedule
if isinstance(schedule_obj, schedules.crontab):
offset_cs = CrontabSchedule.from_schedule(offset_cron(schedule_obj))
offset_cs, created = CrontabSchedule.objects.get_or_create(
minute=offset_cs.minute,
hour=offset_cs.hour,
day_of_month=offset_cs.day_of_month,
month_of_year=offset_cs.month_of_year,
day_of_week=offset_cs.day_of_week,
timezone=offset_cs.timezone,
)
entry.schedule = offset_cron(schedule_obj) # This gets passed into Celery Beats Memory, important to keep it in sync with the model/DB
entry.model.crontab = offset_cs
entry.model.save()
logger.debug(f"Offset applied for '{name}' due to 'apply_offset' = True.")
if entry.model.enabled:
s[name] = entry
except Exception as e:
logger.exception("Error updating schedule for %s: %r", name, e)
self.schedule.update(s)

View File

@ -1,64 +0,0 @@
from unittest.mock import patch
from django.test import TestCase
from allianceauth.crontab.models import CronOffset
class CronOffsetModelTest(TestCase):
def test_cron_offset_is_singleton(self):
"""
Test that CronOffset is indeed a singleton and that
multiple calls to get_solo() return the same instance.
"""
offset1 = CronOffset.get_solo()
offset2 = CronOffset.get_solo()
# They should be the exact same object in memory
self.assertEqual(offset1.pk, offset2.pk)
def test_default_values_random(self):
"""
Test that the default values are set via random_default() when
no explicit value is provided. We'll patch 'random.random' to
produce predictable output.
"""
with patch('allianceauth.crontab.models.random', return_value=0.1234):
# Force creation of a new CronOffset by clearing the existing one
CronOffset.objects.all().delete()
offset = CronOffset.get_solo() # This triggers creation
# All fields should be 0.1234, because we patched random()
self.assertAlmostEqual(offset.minute, 0.1234)
self.assertAlmostEqual(offset.hour, 0.1234)
self.assertAlmostEqual(offset.day_of_month, 0.1234)
self.assertAlmostEqual(offset.month_of_year, 0.1234)
self.assertAlmostEqual(offset.day_of_week, 0.1234)
def test_update_offset_values(self):
"""
Test that we can update the offsets and retrieve them.
"""
offset = CronOffset.get_solo()
offset.minute = 0.5
offset.hour = 0.25
offset.day_of_month = 0.75
offset.month_of_year = 0.99
offset.day_of_week = 0.33
offset.save()
# Retrieve again to ensure changes persist
saved_offset = CronOffset.get_solo()
self.assertEqual(saved_offset.minute, 0.5)
self.assertEqual(saved_offset.hour, 0.25)
self.assertEqual(saved_offset.day_of_month, 0.75)
self.assertEqual(saved_offset.month_of_year, 0.99)
self.assertEqual(saved_offset.day_of_week, 0.33)
def test_str_representation(self):
"""
Verify the __str__ method returns 'Cron Offsets'.
"""
offset = CronOffset.get_solo()
self.assertEqual(str(offset), "Cron Offsets")

View File

@ -1,82 +0,0 @@
# myapp/tests/test_tasks.py
import logging
from unittest.mock import patch
from celery.schedules import crontab
from django.db import ProgrammingError
from django.test import TestCase
from allianceauth.crontab.models import CronOffset
from allianceauth.crontab.utils import offset_cron
logger = logging.getLogger(__name__)
class TestOffsetCron(TestCase):
def test_offset_cron_normal(self):
"""
Test that offset_cron modifies the minute/hour fields
based on the CronOffset values when everything is normal.
"""
# We'll create a mock CronOffset instance
mock_offset = CronOffset(minute=0.5, hour=0.5)
# Our initial crontab schedule
original_schedule = crontab(
minute=[0, 5, 55],
hour=[0, 3, 23],
day_of_month='*',
month_of_year='*',
day_of_week='*'
)
# Patch CronOffset.get_solo to return our mock offset
with patch('allianceauth.crontab.models.CronOffset.get_solo', return_value=mock_offset):
new_schedule = offset_cron(original_schedule)
# Check the new minute/hour
# minute 0 -> 0 + round(60 * 0.5) = 30 % 60 = 30
# minute 5 -> 5 + 30 = 35 % 60 = 35
# minute 55 -> 55 + 30 = 85 % 60 = 25 --> sorted => 25,30,35
self.assertEqual(new_schedule._orig_minute, '25,30,35')
# hour 0 -> 0 + round(24 * 0.5) = 12 % 24 = 12
# hour 3 -> 3 + 12 = 15 % 24 = 15
# hour 23 -> 23 + 12 = 35 % 24 = 11 --> sorted => 11,12,15
self.assertEqual(new_schedule._orig_hour, '11,12,15')
# Check that other fields are unchanged
self.assertEqual(new_schedule._orig_day_of_month, '*')
self.assertEqual(new_schedule._orig_month_of_year, '*')
self.assertEqual(new_schedule._orig_day_of_week, '*')
def test_offset_cron_programming_error(self):
"""
Test that if a ProgrammingError is raised (e.g. before migrations),
offset_cron just returns the original schedule.
"""
original_schedule = crontab(minute=[0, 15, 30], hour=[1, 2, 3])
# Force get_solo to raise ProgrammingError
with patch('allianceauth.crontab.models.CronOffset.get_solo', side_effect=ProgrammingError()):
new_schedule = offset_cron(original_schedule)
# Should return the original schedule unchanged
self.assertEqual(new_schedule, original_schedule)
def test_offset_cron_unexpected_exception(self):
"""
Test that if any other exception is raised, offset_cron
also returns the original schedule, and logs the error.
"""
original_schedule = crontab(minute='0', hour='0')
# Force get_solo to raise a generic Exception
with patch('allianceauth.crontab.models.CronOffset.get_solo', side_effect=Exception("Something bad")):
new_schedule = offset_cron(original_schedule)
# Should return the original schedule unchanged
self.assertEqual(new_schedule, original_schedule)

View File

@ -1,52 +0,0 @@
import logging
from celery.schedules import crontab
from django.db import ProgrammingError
from allianceauth.crontab.models import CronOffset
logger = logging.getLogger(__name__)
def offset_cron(schedule: crontab) -> crontab:
"""Take a crontab and apply a series of precalculated offsets to spread out tasks execution on remote resources
Args:
schedule (crontab): celery.schedules.crontab()
Returns:
crontab: A crontab with offsetted Minute and Hour fields
"""
try:
cron_offset = CronOffset.get_solo()
# Stops this shit from happening 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23
# It is only cosmetic, but still annoying
if schedule._orig_minute == '*':
new_minute = '*'
else:
new_minute = [(m + (round(60 * cron_offset.minute))) % 60 for m in schedule.minute]
if schedule._orig_hour == '*':
new_hour = '*'
else:
new_hour = [(m + (round(24 * cron_offset.hour))) % 24 for m in schedule.hour]
return crontab(
minute=",".join(str(m) for m in sorted(new_minute)),
hour=",".join(str(h) for h in sorted(new_hour)),
day_of_month=schedule._orig_day_of_month,
month_of_year=schedule._orig_month_of_year,
day_of_week=schedule._orig_day_of_week)
except ProgrammingError as e:
# If this is called before migrations are run hand back the default schedule
# These offsets are stored in a Singleton Model,
logger.error(e)
return schedule
except Exception as e:
# We absolutely cant fail to hand back a schedule
logger.error(e)
return schedule

View File

@ -81,7 +81,7 @@ class AutogroupsConfig(models.Model):
objects = AutogroupsConfigManager() objects = AutogroupsConfigManager()
def __str__(self) -> str: def __str__(self):
return 'States: ' + (' '.join(list(self.states.all().values_list('name', flat=True))) if self.pk else str(None)) return 'States: ' + (' '.join(list(self.states.all().values_list('name', flat=True))) if self.pk else str(None))
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
@ -235,7 +235,7 @@ class ManagedGroup(models.Model):
class Meta: class Meta:
abstract = True abstract = True
def __str__(self) -> str: def __str__(self):
return f"Managed Group: {self.group.name}" return f"Managed Group: {self.group.name}"
class ManagedCorpGroup(ManagedGroup): class ManagedCorpGroup(ManagedGroup):

View File

@ -4,7 +4,7 @@ from urllib.parse import quote, urljoin
from . import _ESI_CATEGORY_ALLIANCE, _ESI_CATEGORY_CORPORATION, _ESI_CATEGORY_REGION, _ESI_CATEGORY_SOLARSYSTEM from . import _ESI_CATEGORY_ALLIANCE, _ESI_CATEGORY_CORPORATION, _ESI_CATEGORY_REGION, _ESI_CATEGORY_SOLARSYSTEM
_BASE_URL = 'https://evemaps.dotlan.net' _BASE_URL = 'http://evemaps.dotlan.net'
def _build_url(category: str, name: str) -> str: def _build_url(category: str, name: str) -> str:

View File

@ -29,29 +29,29 @@ class TestDotlan(TestCase):
def test_alliance_url(self): def test_alliance_url(self):
self.assertEqual( self.assertEqual(
dotlan.alliance_url('Wayne Enterprices'), dotlan.alliance_url('Wayne Enterprices'),
'https://evemaps.dotlan.net/alliance/Wayne_Enterprices' 'http://evemaps.dotlan.net/alliance/Wayne_Enterprices'
) )
def test_corporation_url(self): def test_corporation_url(self):
self.assertEqual( self.assertEqual(
dotlan.corporation_url('Wayne Technology'), dotlan.corporation_url('Wayne Technology'),
'https://evemaps.dotlan.net/corp/Wayne_Technology' 'http://evemaps.dotlan.net/corp/Wayne_Technology'
) )
self.assertEqual( self.assertEqual(
dotlan.corporation_url('Crédit Agricole'), dotlan.corporation_url('Crédit Agricole'),
'https://evemaps.dotlan.net/corp/Cr%C3%A9dit_Agricole' 'http://evemaps.dotlan.net/corp/Cr%C3%A9dit_Agricole'
) )
def test_region_url(self): def test_region_url(self):
self.assertEqual( self.assertEqual(
dotlan.region_url('Black Rise'), dotlan.region_url('Black Rise'),
'https://evemaps.dotlan.net/map/Black_Rise' 'http://evemaps.dotlan.net/map/Black_Rise'
) )
def test_solar_system_url(self): def test_solar_system_url(self):
self.assertEqual( self.assertEqual(
dotlan.solar_system_url('Jita'), dotlan.solar_system_url('Jita'),
'https://evemaps.dotlan.net/system/Jita' 'http://evemaps.dotlan.net/system/Jita'
) )

View File

@ -32,7 +32,7 @@ class EveFactionInfo(models.Model):
provider = providers.provider provider = providers.provider
def __str__(self) -> str: def __str__(self):
return self.faction_name return self.faction_name
@staticmethod @staticmethod
@ -80,7 +80,7 @@ class EveAllianceInfo(models.Model):
class Meta: class Meta:
indexes = [models.Index(fields=['executor_corp_id',])] indexes = [models.Index(fields=['executor_corp_id',])]
def __str__(self) -> str: def __str__(self):
return self.alliance_name return self.alliance_name
def populate_alliance(self): def populate_alliance(self):
alliance = self.provider.get_alliance(self.alliance_id) alliance = self.provider.get_alliance(self.alliance_id)
@ -152,7 +152,7 @@ class EveCorporationInfo(models.Model):
class Meta: class Meta:
indexes = [models.Index(fields=['ceo_id',]),] indexes = [models.Index(fields=['ceo_id',]),]
def __str__(self) -> str: def __str__(self):
return self.corporation_name return self.corporation_name
def update_corporation(self, corp: providers.Corporation = None): def update_corporation(self, corp: providers.Corporation = None):
if corp is None: if corp is None:
@ -226,7 +226,7 @@ class EveCharacter(models.Model):
models.Index(fields=['faction_id',]), models.Index(fields=['faction_id',]),
] ]
def __str__(self) -> str: def __str__(self):
return self.character_name return self.character_name
@property @property

View File

@ -36,7 +36,7 @@ class ObjectNotFound(Exception):
self.id = obj_id self.id = obj_id
self.type = type_name self.type = type_name
def __str__(self) -> str: def __str__(self):
return f'{self.type} with ID {self.id} not found.' return f'{self.type} with ID {self.id} not found.'
@ -46,7 +46,7 @@ class Entity:
self.id = id self.id = id
self.name = name self.name = name
def __str__(self) -> str: def __str__(self):
return self.name return self.name
def __repr__(self): def __repr__(self):
@ -206,7 +206,7 @@ class EveSwaggerProvider(EveProvider):
) )
return self._client return self._client
def __str__(self) -> str: def __str__(self):
return 'esi' return 'esi'
def get_alliance(self, alliance_id: int) -> Alliance: def get_alliance(self, alliance_id: int) -> Alliance:

View File

@ -1,5 +1,4 @@
import logging import logging
from random import randint
from celery import shared_task from celery import shared_task
@ -9,8 +8,7 @@ from .models import EveAllianceInfo, EveCharacter, EveCorporationInfo
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
TASK_PRIORITY = 7 TASK_PRIORITY = 7
CHARACTER_AFFILIATION_CHUNK_SIZE = 500 CHUNK_SIZE = 500
EVEONLINE_TASK_JITTER = 600
def chunks(lst, n): def chunks(lst, n):
@ -20,13 +18,13 @@ def chunks(lst, n):
@shared_task @shared_task
def update_corp(corp_id: int) -> None: def update_corp(corp_id):
"""Update given corporation from ESI""" """Update given corporation from ESI"""
EveCorporationInfo.objects.update_corporation(corp_id) EveCorporationInfo.objects.update_corporation(corp_id)
@shared_task @shared_task
def update_alliance(alliance_id: int) -> None: def update_alliance(alliance_id):
"""Update given alliance from ESI""" """Update given alliance from ESI"""
EveAllianceInfo.objects.update_alliance(alliance_id).populate_alliance() EveAllianceInfo.objects.update_alliance(alliance_id).populate_alliance()
@ -38,30 +36,23 @@ def update_character(character_id: int) -> None:
@shared_task @shared_task
def run_model_update() -> None: def run_model_update():
"""Update all alliances, corporations and characters from ESI""" """Update all alliances, corporations and characters from ESI"""
# Queue update tasks for Known Corporation Models #update existing corp models
for corp in EveCorporationInfo.objects.all().values('corporation_id'): for corp in EveCorporationInfo.objects.all().values('corporation_id'):
update_corp.apply_async( update_corp.apply_async(args=[corp['corporation_id']], priority=TASK_PRIORITY)
args=[corp['corporation_id']],
priority=TASK_PRIORITY,
countdown=randint(1, EVEONLINE_TASK_JITTER))
# Queue update tasks for Known Alliance Models # update existing alliance models
for alliance in EveAllianceInfo.objects.all().values('alliance_id'): for alliance in EveAllianceInfo.objects.all().values('alliance_id'):
update_alliance.apply_async( update_alliance.apply_async(args=[alliance['alliance_id']], priority=TASK_PRIORITY)
args=[alliance['alliance_id']],
priority=TASK_PRIORITY,
countdown=randint(1, EVEONLINE_TASK_JITTER))
# Queue update tasks for Known Character Models # update existing character models
character_ids = EveCharacter.objects.all().values_list('character_id', flat=True) character_ids = EveCharacter.objects.all().values_list('character_id', flat=True)
for character_ids_chunk in chunks(character_ids, CHARACTER_AFFILIATION_CHUNK_SIZE): for character_ids_chunk in chunks(character_ids, CHUNK_SIZE):
update_character_chunk.apply_async( update_character_chunk.apply_async(
args=[character_ids_chunk], args=[character_ids_chunk], priority=TASK_PRIORITY
priority=TASK_PRIORITY, )
countdown=randint(1, EVEONLINE_TASK_JITTER))
@shared_task @shared_task
@ -76,9 +67,8 @@ def update_character_chunk(character_ids_chunk: list):
logger.info("Failed to bulk update characters. Attempting single updates") logger.info("Failed to bulk update characters. Attempting single updates")
for character_id in character_ids_chunk: for character_id in character_ids_chunk:
update_character.apply_async( update_character.apply_async(
args=[character_id], args=[character_id], priority=TASK_PRIORITY
priority=TASK_PRIORITY, )
countdown=randint(1, EVEONLINE_TASK_JITTER))
return return
affiliations = { affiliations = {
@ -116,5 +106,5 @@ def update_character_chunk(character_ids_chunk: list):
if corp_changed or alliance_changed or name_changed: if corp_changed or alliance_changed or name_changed:
update_character.apply_async( update_character.apply_async(
args=[character.get('character_id')], args=[character.get('character_id')], priority=TASK_PRIORITY
priority=TASK_PRIORITY) )

View File

@ -13,7 +13,7 @@ class BravadoResponseStub:
self.headers = headers if headers else {} self.headers = headers if headers else {}
self.raw_bytes = raw_bytes self.raw_bytes = raw_bytes
def __str__(self) -> str: def __str__(self):
return f"{self.status_code} {self.reason}" return f"{self.status_code} {self.reason}"

View File

@ -723,5 +723,5 @@ class TestEveSwaggerProvider(TestCase):
my_client = my_provider.client my_client = my_provider.client
operation = my_client.Universe.get_universe_factions() operation = my_client.Universe.get_universe_factions()
self.assertEqual( self.assertEqual(
operation.future.request.headers['User-Agent'], 'allianceauth v1.0.0 dummy@example.net' operation.future.request.headers['User-Agent'], 'allianceauth v1.0.0'
) )

View File

@ -84,7 +84,7 @@ class TestUpdateTasks(TestCase):
@override_settings(CELERY_ALWAYS_EAGER=True) @override_settings(CELERY_ALWAYS_EAGER=True)
@patch('allianceauth.eveonline.providers.esi_client_factory') @patch('allianceauth.eveonline.providers.esi_client_factory')
@patch('allianceauth.eveonline.tasks.providers') @patch('allianceauth.eveonline.tasks.providers')
@patch('allianceauth.eveonline.tasks.CHARACTER_AFFILIATION_CHUNK_SIZE', 2) @patch('allianceauth.eveonline.tasks.CHUNK_SIZE', 2)
class TestRunModelUpdate(TransactionTestCase): class TestRunModelUpdate(TransactionTestCase):
def test_should_run_updates(self, mock_providers, mock_esi_client_factory): def test_should_run_updates(self, mock_providers, mock_esi_client_factory):
# given # given
@ -139,7 +139,7 @@ class TestRunModelUpdate(TransactionTestCase):
@patch('allianceauth.eveonline.tasks.update_character', wraps=update_character) @patch('allianceauth.eveonline.tasks.update_character', wraps=update_character)
@patch('allianceauth.eveonline.providers.esi_client_factory') @patch('allianceauth.eveonline.providers.esi_client_factory')
@patch('allianceauth.eveonline.tasks.providers') @patch('allianceauth.eveonline.tasks.providers')
@patch('allianceauth.eveonline.tasks.CHARACTER_AFFILIATION_CHUNK_SIZE', 2) @patch('allianceauth.eveonline.tasks.CHUNK_SIZE', 2)
class TestUpdateCharacterChunk(TestCase): class TestUpdateCharacterChunk(TestCase):
@staticmethod @staticmethod
def _updated_character_ids(spy_update_character) -> set: def _updated_character_ids(spy_update_character) -> set:

View File

@ -1,6 +1,6 @@
# Generated by Django 1.10.1 on 2016-09-05 22:20 # Generated by Django 1.10.1 on 2016-09-05 22:20
from datetime import datetime, timezone import datetime
from django.db import migrations, models from django.db import migrations, models
@ -15,6 +15,6 @@ class Migration(migrations.Migration):
migrations.AlterField( migrations.AlterField(
model_name='fatlink', model_name='fatlink',
name='fatdatetime', name='fatdatetime',
field=models.DateTimeField(default=datetime(2016, 9, 5, 22, 20, 2, 999041, tzinfo=timezone.utc)), field=models.DateTimeField(default=datetime.datetime(2016, 9, 5, 22, 20, 2, 999041, tzinfo=datetime.timezone.utc)),
), ),
] ]

View File

@ -13,7 +13,7 @@ class Fatlink(models.Model):
hash = models.CharField(max_length=254, unique=True) hash = models.CharField(max_length=254, unique=True)
creator = models.ForeignKey(User, on_delete=models.SET(get_sentinel_user)) creator = models.ForeignKey(User, on_delete=models.SET(get_sentinel_user))
def __str__(self) -> str: def __str__(self):
return self.fleet return self.fleet
@ -28,5 +28,5 @@ class Fat(models.Model):
class Meta: class Meta:
unique_together = (('character', 'fatlink'),) unique_together = (('character', 'fatlink'),)
def __str__(self) -> str: def __str__(self):
return f"Fat-link for {self.character.character_name}" return f"Fat-link for {self.character.character_name}"

View File

@ -1,12 +1,13 @@
import datetime
import logging import logging
import os import os
from datetime import datetime, timedelta, timezone
from django.contrib import messages from django.contrib import messages
from django.contrib.auth.decorators import login_required, permission_required from django.contrib.auth.decorators import login_required, permission_required
from django.contrib.auth.models import User from django.contrib.auth.models import User
from django.core.exceptions import ObjectDoesNotExist, ValidationError from django.core.exceptions import ObjectDoesNotExist, ValidationError
from django.shortcuts import get_object_or_404, redirect, render from django.shortcuts import get_object_or_404, redirect, render
from django.utils import timezone
from django.utils.crypto import get_random_string from django.utils.crypto import get_random_string
from django.utils.translation import gettext_lazy as _ from django.utils.translation import gettext_lazy as _
@ -134,7 +135,7 @@ def fatlink_statistics_corp_view(request, corpid, year=None, month=None):
stat_list.sort(key=lambda stat: (stat.n_fats, stat.avg_fat), reverse=True) stat_list.sort(key=lambda stat: (stat.n_fats, stat.avg_fat), reverse=True)
context = {'fatStats': stat_list, 'month': start_of_month.strftime("%B"), 'year': year, 'previous_month': start_of_previous_month, 'corpid': corpid} context = {'fatStats': stat_list, 'month': start_of_month.strftime("%B"), 'year': year, 'previous_month': start_of_previous_month, 'corpid': corpid}
if datetime.datetime.now(timezone.utc) > start_of_next_month: if datetime.datetime.now() > start_of_next_month:
context.update({'next_month': start_of_next_month}) context.update({'next_month': start_of_next_month})
return render(request, 'fleetactivitytracking/fatlinkstatisticscorpview.html', context=context) return render(request, 'fleetactivitytracking/fatlinkstatisticscorpview.html', context=context)
@ -173,7 +174,7 @@ def fatlink_statistics_view(request, year=None, month=None):
stat_list.sort(key=lambda stat: (stat.n_fats, stat.avg_fat), reverse=True) stat_list.sort(key=lambda stat: (stat.n_fats, stat.avg_fat), reverse=True)
context = {'fatStats': stat_list, 'month': start_of_month.strftime("%B"), 'year': year, 'previous_month': start_of_previous_month} context = {'fatStats': stat_list, 'month': start_of_month.strftime("%B"), 'year': year, 'previous_month': start_of_previous_month}
if datetime.datetime.now(timezone.utc) > start_of_next_month: if datetime.datetime.now() > start_of_next_month:
context.update({'next_month': start_of_next_month}) context.update({'next_month': start_of_next_month})
return render(request, 'fleetactivitytracking/fatlinkstatisticsview.html', context=context) return render(request, 'fleetactivitytracking/fatlinkstatisticsview.html', context=context)
@ -201,7 +202,7 @@ def fatlink_personal_statistics_view(request, year=None):
monthlystats = [(i + 1, datetime.date(year, i + 1, 1).strftime("%h"), monthlystats[i]) for i in range(12)] monthlystats = [(i + 1, datetime.date(year, i + 1, 1).strftime("%h"), monthlystats[i]) for i in range(12)]
if datetime.datetime.now(timezone.utc) > datetime.datetime(year + 1, 1, 1): if datetime.datetime.now() > datetime.datetime(year + 1, 1, 1):
context = {'user': user, 'monthlystats': monthlystats, 'year': year, 'previous_year': year - 1, 'next_year': year + 1} context = {'user': user, 'monthlystats': monthlystats, 'year': year, 'previous_year': year - 1, 'next_year': year + 1}
else: else:
context = {'user': user, 'monthlystats': monthlystats, 'year': year, 'previous_year': year - 1} context = {'user': user, 'monthlystats': monthlystats, 'year': year, 'previous_year': year - 1}
@ -271,7 +272,7 @@ def click_fatlink_view(request, token, fat_hash=None):
if character_online["online"] is True: if character_online["online"] is True:
fatlink = get_object_or_404(Fatlink, hash=fat_hash) fatlink = get_object_or_404(Fatlink, hash=fat_hash)
if (datetime.now(timezone.utc) - fatlink.fatdatetime) < timedelta(seconds=(fatlink.duration * 60)): if (timezone.now() - fatlink.fatdatetime) < datetime.timedelta(seconds=(fatlink.duration * 60)):
if character: if character:
# get data # get data
location = c.Location.get_characters_character_id_location(character_id=token.character_id).result() location = c.Location.get_characters_character_id_location(character_id=token.character_id).result()

View File

@ -13,15 +13,6 @@
} }
} }
/* Image overflow fix
------------------------------------------------------------------------------------- */
@media all {
img {
max-width: 100%;
height: auto;
}
}
/* Side Navigation /* Side Navigation
------------------------------------------------------------------------------------- */ ------------------------------------------------------------------------------------- */
@media all { @media all {
@ -49,14 +40,14 @@
} }
/* Chevron icons */ /* Chevron icons */
#sidebar-menu span[data-bs-toggle="collapse"][aria-expanded="true"] > i.fa-chevron-down, #sidebar-menu [data-bs-toggle="collapse"] > i.fa-chevron-down,
#sidebar-menu span[data-bs-toggle="collapse"][aria-expanded="false"] > i.fa-chevron-right { #sidebar-menu [data-bs-toggle="collapse"].collapsed > i.fa-chevron-right {
display: block; display: block;
width: 16px; width: 16px;
} }
#sidebar-menu span[data-bs-toggle="collapse"][aria-expanded="true"] > i.fa-chevron-right, #sidebar-menu [data-bs-toggle="collapse"] > i.fa-chevron-right,
#sidebar-menu span[data-bs-toggle="collapse"][aria-expanded="false"] > i.fa-chevron-down { #sidebar-menu [data-bs-toggle="collapse"].collapsed > i.fa-chevron-down {
display: none; display: none;
} }
} }

View File

@ -49,7 +49,7 @@ class GroupsMenuItem(MenuItemHook):
MenuItemHook.__init__( MenuItemHook.__init__(
self, self,
text=_("Groups"), text=_("Groups"),
classes="fa-solid fa-users", classes="fa-solid fa-user",
url_name="groupmanagement:groups", url_name="groupmanagement:groups",
order=25, order=25,
navactive=[ navactive=[

View File

@ -1,3 +1,5 @@
from django.conf import settings from django.conf import settings
from django.contrib.auth.models import Group, User from django.contrib.auth.models import Group, User
from django.db import models from django.db import models
@ -15,7 +17,7 @@ class GroupRequest(models.Model):
user = models.ForeignKey(User, on_delete=models.CASCADE) user = models.ForeignKey(User, on_delete=models.CASCADE)
group = models.ForeignKey(Group, on_delete=models.CASCADE) group = models.ForeignKey(Group, on_delete=models.CASCADE)
def __str__(self) -> str: def __str__(self):
return self.user.username + ":" + self.group.name return self.user.username + ":" + self.group.name
@property @property
@ -50,7 +52,7 @@ class RequestLog(models.Model):
request_actor = models.ForeignKey(User, on_delete=models.CASCADE) request_actor = models.ForeignKey(User, on_delete=models.CASCADE)
date = models.DateTimeField(auto_now_add=True) date = models.DateTimeField(auto_now_add=True)
def __str__(self) -> str: def __str__(self):
return self.pk return self.pk
def requestor(self): def requestor(self):
@ -179,7 +181,7 @@ class AuthGroup(models.Model):
) )
default_permissions = () default_permissions = ()
def __str__(self) -> str: def __str__(self):
return self.group.name return self.group.name
def group_request_approvers(self) -> set[User]: def group_request_approvers(self) -> set[User]:

View File

@ -1,6 +1,5 @@
{% extends "allianceauth/base-bs5.html" %} {% extends "allianceauth/base-bs5.html" %}
{% load aa_i18n %}
{% load static %} {% load static %}
{% load i18n %} {% load i18n %}
{% load navactive %} {% load navactive %}
@ -74,8 +73,6 @@
{% include 'bundles/moment-js.html' with locale=True %} {% include 'bundles/moment-js.html' with locale=True %}
{% include 'bundles/filterdropdown-js.html' %} {% include 'bundles/filterdropdown-js.html' %}
{% get_datatables_language_static LANGUAGE_CODE as DT_LANG_PATH %}
<script> <script>
$.fn.dataTable.moment = (format, locale) => { $.fn.dataTable.moment = (format, locale) => {
const types = $.fn.dataTable.ext.type; const types = $.fn.dataTable.ext.type;
@ -97,7 +94,6 @@
$.fn.dataTable.moment('YYYY-MMM-D, HH:mm'); $.fn.dataTable.moment('YYYY-MMM-D, HH:mm');
$('#log-entries').DataTable({ $('#log-entries').DataTable({
language: {url: '{{ DT_LANG_PATH }}'},
order: [[0, 'desc'], [1, 'asc']], order: [[0, 'desc'], [1, 'asc']],
filterDropDown: filterDropDown:
{ {

View File

@ -1,7 +1,6 @@
{% extends "allianceauth/base-bs5.html" %} {% extends "allianceauth/base-bs5.html" %}
{% load static %} {% load static %}
{% load aa_i18n %}
{% load i18n %} {% load i18n %}
{% load evelinks %} {% load evelinks %}
{% load navactive %} {% load navactive %}
@ -87,12 +86,9 @@
{% block extra_javascript %} {% block extra_javascript %}
{% include 'bundles/datatables-js-bs5.html' %} {% include 'bundles/datatables-js-bs5.html' %}
{% get_datatables_language_static LANGUAGE_CODE as DT_LANG_PATH %}
<script> <script>
$(document).ready(() => { $(document).ready(() => {
$('#tab_group_members').DataTable({ $('#tab_group_members').DataTable({
language: {url: '{{ DT_LANG_PATH }}'},
order: [[0, "asc"]], order: [[0, "asc"]],
columnDefs: [ columnDefs: [
{ {

View File

@ -1,7 +1,6 @@
{% extends "allianceauth/base-bs5.html" %} {% extends "allianceauth/base-bs5.html" %}
{% load static %} {% load static %}
{% load aa_i18n %}
{% load i18n %} {% load i18n %}
{% block page_title %} {% block page_title %}
@ -57,7 +56,7 @@
{% endif %} {% endif %}
{% endfor %} {% endfor %}
{% endif %} {% endif %}
{% if g.group.authgroup.group_leader_groups.all.count %} {% if g.group.authgroup.group_leaders.all.count %}
{% for group in g.group.authgroup.group_leader_groups.all %} {% for group in g.group.authgroup.group_leader_groups.all %}
<span class="my-1 me-1 badge bg-secondary">{{group.name}}</span> <span class="my-1 me-1 badge bg-secondary">{{group.name}}</span>
{% endfor %} {% endfor %}
@ -104,13 +103,9 @@
{% block extra_javascript %} {% block extra_javascript %}
{% include 'bundles/datatables-js-bs5.html' %} {% include 'bundles/datatables-js-bs5.html' %}
{% get_datatables_language_static LANGUAGE_CODE as DT_LANG_PATH %}
<script> <script>
$(document).ready(() => { $(document).ready(() => {
$('#groupsTable').DataTable({ $('#groupsTable').DataTable();
language: {url: '{{ DT_LANG_PATH }}'},
});
}); });
</script> </script>
{% endblock %} {% endblock %}

View File

@ -1,3 +1,4 @@
from django.contrib.auth.models import User from django.contrib.auth.models import User
from django.db import models from django.db import models

View File

@ -13,7 +13,7 @@ class ApplicationQuestion(models.Model):
help_text = models.CharField(max_length=254, blank=True) help_text = models.CharField(max_length=254, blank=True)
multi_select = models.BooleanField(default=False) multi_select = models.BooleanField(default=False)
def __str__(self) -> str: def __str__(self):
return "Question: " + self.title return "Question: " + self.title
@ -21,7 +21,7 @@ class ApplicationChoice(models.Model):
question = models.ForeignKey(ApplicationQuestion,on_delete=models.CASCADE,related_name="choices") question = models.ForeignKey(ApplicationQuestion,on_delete=models.CASCADE,related_name="choices")
choice_text = models.CharField(max_length=200, verbose_name='Choice') choice_text = models.CharField(max_length=200, verbose_name='Choice')
def __str__(self) -> str: def __str__(self):
return self.choice_text return self.choice_text
@ -29,7 +29,7 @@ class ApplicationForm(models.Model):
questions = SortedManyToManyField(ApplicationQuestion) questions = SortedManyToManyField(ApplicationQuestion)
corp = models.OneToOneField(EveCorporationInfo, on_delete=models.CASCADE) corp = models.OneToOneField(EveCorporationInfo, on_delete=models.CASCADE)
def __str__(self) -> str: def __str__(self):
return str(self.corp) return str(self.corp)
@ -50,7 +50,7 @@ class Application(models.Model):
('view_apis', 'Can view applicant APIs'),) ('view_apis', 'Can view applicant APIs'),)
unique_together = ('form', 'user') unique_together = ('form', 'user')
def __str__(self) -> str: def __str__(self):
return str(self.user) + " Application To " + str(self.form) return str(self.user) + " Application To " + str(self.form)
@property @property
@ -77,7 +77,7 @@ class ApplicationResponse(models.Model):
answer = models.TextField() answer = models.TextField()
class Meta: class Meta:
unique_together = ('question', 'application') unique_together = ('question', 'application')
def __str__(self) -> str: def __str__(self):
return str(self.application) + " Answer To " + str(self.question) return str(self.application) + " Answer To " + str(self.question)
@ -89,5 +89,5 @@ class ApplicationComment(models.Model):
text = models.TextField() text = models.TextField()
created = models.DateTimeField(auto_now_add=True) created = models.DateTimeField(auto_now_add=True)
def __str__(self) -> str: def __str__(self):
return str(self.user) + " comment on " + str(self.application) return str(self.user) + " comment on " + str(self.application)

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -11,8 +11,8 @@
data-bs-target="#{{ item.html_id }}" data-bs-target="#{{ item.html_id }}"
aria-expanded="false" aria-expanded="false"
aria-controls="" aria-controls=""
{% endif %} {% endif %}>
></i> </i>
<a <a
class="nav-link flex-fill align-self-center me-auto {% if item.navactive %}{% navactive request item.navactive|join:' ' %}{% endif %}" class="nav-link flex-fill align-self-center me-auto {% if item.navactive %}{% navactive request item.navactive|join:' ' %}{% endif %}"
{% if item.is_folder %} {% if item.is_folder %}
@ -36,7 +36,7 @@
{% if item.is_folder %} {% if item.is_folder %}
<span <span
class="pill m-2 align-self-center" class="pill m-2 align-self-center collapsed"
type="button" type="button"
data-bs-toggle="collapse" data-bs-toggle="collapse"
data-bs-target="#{{ item.html_id }}" data-bs-target="#{{ item.html_id }}"

View File

@ -1,21 +1 @@
"""
Example
-------
.. code-block:: python
from allianceauth.notifications.models import Notification
def notify_user_view(request):
'''Simple view sending a notification to the user'''
Notification.objects.notify_user(
user=request.user,
title="Some title",
message="Some message",
level=Notification.Level.INFO,
)
"""
from .core import notify # noqa: F401 from .core import notify # noqa: F401

View File

@ -15,7 +15,7 @@ class OpForm(forms.Form):
operation_name = forms.CharField(max_length=254, required=True, label=_("Operation Name")) operation_name = forms.CharField(max_length=254, required=True, label=_("Operation Name"))
type = forms.CharField(required=False, label=_("Operation Type")) type = forms.CharField(required=False, label=_("Operation Type"))
fc = forms.CharField(max_length=254, required=True, label=_("Fleet Commander")) fc = forms.CharField(max_length=254, required=True, label=_("Fleet Commander"))
duration = forms.CharField(max_length=25, required=True, label=_("Duration")) duration = forms.CharField(max_length=254, required=True, label=_("Duration"))
description = forms.CharField( description = forms.CharField(
widget=forms.Textarea(attrs={"rows": 10, "cols": 20, "input_type": "textarea"}), widget=forms.Textarea(attrs={"rows": 10, "cols": 20, "input_type": "textarea"}),
required=False, required=False,

View File

@ -19,7 +19,7 @@ class OpTimerType(models.Model):
ordering = ['type'] ordering = ['type']
default_permissions = () default_permissions = ()
def __str__(self) -> str: def __str__(self):
return self.type return self.type
class OpTimer(models.Model): class OpTimer(models.Model):
@ -39,5 +39,5 @@ class OpTimer(models.Model):
class Meta: class Meta:
ordering = ['start'] ordering = ['start']
default_permissions = () default_permissions = ()
def __str__(self) -> str: def __str__(self):
return self.operation_name return self.operation_name

View File

@ -1,6 +1,5 @@
{% extends "allianceauth/base-bs5.html" %} {% extends "allianceauth/base-bs5.html" %}
{% load aa_i18n %}
{% load i18n %} {% load i18n %}
{% block page_title %} {% block page_title %}
@ -58,14 +57,11 @@
{% include "bundles/datatables-js-bs5.html" %} {% include "bundles/datatables-js-bs5.html" %}
{% include "bundles/filterdropdown-js.html" %} {% include "bundles/filterdropdown-js.html" %}
{% get_datatables_language_static LANGUAGE_CODE as DT_LANG_PATH %}
<script> <script>
$(document).ready(() => { $(document).ready(() => {
const groupColumn = 0; const groupColumn = 0;
$('#tab_permissions_audit').DataTable({ $('#tab_permissions_audit').DataTable({
language: {url: '{{ DT_LANG_PATH }}'},
columnDefs: [{ columnDefs: [{
"visible": false, "visible": false,
"targets": groupColumn "targets": groupColumn

View File

@ -1,6 +1,5 @@
{% extends "allianceauth/base-bs5.html" %} {% extends "allianceauth/base-bs5.html" %}
{% load aa_i18n %}
{% load i18n %} {% load i18n %}
{% block page_title %} {% block page_title %}
@ -63,14 +62,11 @@
{% include "bundles/datatables-js-bs5.html" %} {% include "bundles/datatables-js-bs5.html" %}
{% include "bundles/filterdropdown-js.html" %} {% include "bundles/filterdropdown-js.html" %}
{% get_datatables_language_static LANGUAGE_CODE as DT_LANG_PATH %}
<script> <script>
$(document).ready(() => { $(document).ready(() => {
const groupColumn = 0; const groupColumn = 0;
$('#tab_permissions_overview').DataTable({ $('#tab_permissions_overview').DataTable({
language: {url: '{{ DT_LANG_PATH }}'},
columnDefs: [{ columnDefs: [{
"visible": false, "visible": false,
"targets": groupColumn "targets": groupColumn

View File

@ -1,22 +1,22 @@
#!/usr/bin/env python #!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os import os
import sys import sys
if __name__ == "__main__":
def main() -> None: os.environ.setdefault("DJANGO_SETTINGS_MODULE", "{{ project_name}}.settings.local")
"""Run administrative tasks."""
os.environ.setdefault('DJANGO_SETTINGS_MODULE', '{{ project_name }}.settings')
try: try:
from django.core.management import execute_from_command_line from django.core.management import execute_from_command_line
except ImportError as exc: except ImportError as err:
raise ImportError( # The above import may fail for some other reason. Ensure that the
"Couldn't import Django. Are you sure it's installed and " # issue is really that Django is missing to avoid masking other
"available on your PYTHONPATH environment variable? Did you " # exceptions on Python 2.
"forget to activate a virtual environment?" try:
) from exc import django # noqa: F401
except ImportError:
raise ImportError(
"Couldn't import Django. Are you sure it's installed and "
"available on your PYTHONPATH environment variable? Did you "
"forget to activate a virtual environment?"
) from err
raise
execute_from_command_line(sys.argv) execute_from_command_line(sys.argv)
if __name__ == '__main__':
main()

View File

@ -42,16 +42,13 @@ INSTALLED_APPS = [
'allianceauth.theme.flatly', 'allianceauth.theme.flatly',
'allianceauth.theme.materia', 'allianceauth.theme.materia',
"allianceauth.custom_css", "allianceauth.custom_css",
'allianceauth.crontab',
'sri',
] ]
SRI_ALGORITHM = "sha512"
SECRET_KEY = "wow I'm a really bad default secret key" SECRET_KEY = "wow I'm a really bad default secret key"
# Celery configuration # Celery configuration
BROKER_URL = 'redis://localhost:6379/0' BROKER_URL = 'redis://localhost:6379/0'
CELERYBEAT_SCHEDULER = "allianceauth.crontab.schedulers.OffsetDatabaseScheduler" CELERYBEAT_SCHEDULER = "django_celery_beat.schedulers.DatabaseScheduler"
CELERYBEAT_SCHEDULE = { CELERYBEAT_SCHEDULE = {
'esi_cleanup_callbackredirect': { 'esi_cleanup_callbackredirect': {
'task': 'esi.tasks.cleanup_callbackredirect', 'task': 'esi.tasks.cleanup_callbackredirect',
@ -64,12 +61,10 @@ CELERYBEAT_SCHEDULE = {
'run_model_update': { 'run_model_update': {
'task': 'allianceauth.eveonline.tasks.run_model_update', 'task': 'allianceauth.eveonline.tasks.run_model_update',
'schedule': crontab(minute='0', hour="*/6"), 'schedule': crontab(minute='0', hour="*/6"),
'apply_offset': True
}, },
'check_all_character_ownership': { 'check_all_character_ownership': {
'task': 'allianceauth.authentication.tasks.check_all_character_ownership', 'task': 'allianceauth.authentication.tasks.check_all_character_ownership',
'schedule': crontab(minute='0', hour='*/4'), 'schedule': crontab(minute='0', hour='*/4'),
'apply_offset': True
}, },
'analytics_daily_stats': { 'analytics_daily_stats': {
'task': 'allianceauth.analytics.tasks.analytics_daily_stats', 'task': 'allianceauth.analytics.tasks.analytics_daily_stats',
@ -77,7 +72,6 @@ CELERYBEAT_SCHEDULE = {
} }
} }
# Build paths inside the project like this: os.path.join(BASE_DIR, ...) # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
PROJECT_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) PROJECT_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
BASE_DIR = os.path.dirname(PROJECT_DIR) BASE_DIR = os.path.dirname(PROJECT_DIR)
@ -116,46 +110,6 @@ LANGUAGES = ( # Sorted by Language Code alphabetical order + English at top
("zh-hans", _("Simplified Chinese")), ("zh-hans", _("Simplified Chinese")),
) )
# Django's language codes are different from some of the libraries we use,
# so we need to map them.
# When adding a new language, please remember to add it to the mapping
# and add the language files to their respective directories under `allianceauth/static/allianceauth/libs/`.
LANGUAGE_MAPPING = {
# See https://github.com/DataTables/Plugins/tree/master/i18n for available languages
# (We use the JSON files)
# `allianceauth/static/allianceauth/libs/DataTables/Plugins/{version}/i18n/` for the files
"DataTables": {
"cs-cz": "cs",
"de": "de-DE",
"es": "es-ES",
"fr-fr": "fr-FR",
"it-it": "it-IT",
"ja": "ja",
"ko-kr": "ko",
"nl-nl": "nl-NL",
"pl-pl": "pl",
"ru": "ru",
"uk": "uk",
"zh-hans": "zh-HANT",
},
# See https://github.com/moment/moment/tree/master/locale for available languages
# `allianceauth/static/allianceauth/libs/moment.js/{version}/locale/` for the files
"MomentJS": {
"cs-cz": "cs",
"de": "de",
"es": "es",
"fr-fr": "fr",
"it-it": "it",
"ja": "ja",
"ko-kr": "ko",
"nl-nl": "nl",
"pl-pl": "pl",
"ru": "ru",
"uk": "uk",
"zh-hans": "zh-cn",
},
}
TEMPLATES = [ TEMPLATES = [
{ {
'BACKEND': 'django.template.backends.django.DjangoTemplates', 'BACKEND': 'django.template.backends.django.DjangoTemplates',

View File

@ -119,7 +119,7 @@ class ServicesHook:
""" """
return '' return ''
def __str__(self) -> str: def __str__(self):
return self.name or 'Unknown Service Module' return self.name or 'Unknown Service Module'
class Urls: class Urls:

View File

@ -26,7 +26,7 @@ class NameFormatConfig(models.Model):
"formatter for each state for each service." "formatter for each state for each service."
) )
def __str__(self) -> str: def __str__(self):
return '{}: {}'.format( return '{}: {}'.format(
self.service_name, ', '.join([str(x) for x in self.states.all()]) self.service_name, ', '.join([str(x) for x in self.states.all()])
) )

View File

@ -2,7 +2,7 @@
of the current Alliance Auth instance. of the current Alliance Auth instance.
Example Example
------- =======
Here is an example for using the api to fetch the current roles from the configured Discord server. Here is an example for using the api to fetch the current roles from the configured Discord server.

View File

@ -89,7 +89,7 @@ def _task_perform_user_action(self, user_pk: int, method: str, **kwargs) -> None
bo, bo,
bo.retry_after_seconds bo.retry_after_seconds
) )
raise self.retry(countdown=bo.retry_after_seconds) from bo raise self.retry(exc=bo, countdown=bo.retry_after_seconds) from bo
except AttributeError as e: except AttributeError as e:
raise ValueError(f'{method} not a valid method for DiscordUser') from e raise ValueError(f'{method} not a valid method for DiscordUser') from e
@ -103,7 +103,7 @@ def _task_perform_user_action(self, user_pk: int, method: str, **kwargs) -> None
exc_info=True exc_info=True
) )
if self.request.retries < DISCORD_TASKS_MAX_RETRIES: if self.request.retries < DISCORD_TASKS_MAX_RETRIES:
raise self.retry(countdown=DISCORD_TASKS_RETRY_PAUSE) from e raise self.retry(exc=e, countdown=DISCORD_TASKS_RETRY_PAUSE) from e
else: else:
logger.error( logger.error(
'%s failed for user %s after max retries', '%s failed for user %s after max retries',
@ -202,9 +202,9 @@ def _task_perform_users_action(self, method: str, **kwargs) -> Any:
bo, bo,
bo.retry_after_seconds bo.retry_after_seconds
) )
raise self.retry(countdown=bo.retry_after_seconds) from bo raise self.retry(exc=bo, countdown=bo.retry_after_seconds) from bo
except (HTTPError, ConnectionError) as e: except (HTTPError, ConnectionError)as e:
logger.warning( logger.warning(
'%s failed, retrying in %d secs', '%s failed, retrying in %d secs',
method, method,
@ -212,7 +212,7 @@ def _task_perform_users_action(self, method: str, **kwargs) -> Any:
exc_info=True exc_info=True
) )
if self.request.retries < DISCORD_TASKS_MAX_RETRIES: if self.request.retries < DISCORD_TASKS_MAX_RETRIES:
raise self.retry(countdown=DISCORD_TASKS_RETRY_PAUSE) from e raise self.retry(exc=e, countdown=DISCORD_TASKS_RETRY_PAUSE) from e
else: else:
logger.error('%s failed after max retries', method, exc_info=True) logger.error('%s failed after max retries', method, exc_info=True)

View File

@ -16,5 +16,5 @@ class DiscourseUser(models.Model):
("access_discourse", "Can access the Discourse service"), ("access_discourse", "Can access the Discourse service"),
) )
def __str__(self) -> str: def __str__(self):
return self.user.username return self.user.username

View File

@ -1,37 +0,0 @@
# Generated by Django 4.2.16 on 2024-10-07 13:39
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("mumble", "0012_mumble_client_info"),
]
operations = [
migrations.AlterModelOptions(
name="mumbleuser",
options={
"permissions": (
("access_mumble", "Can access the Mumble service"),
(
"view_connection_history",
"Can access the connection history of the Mumble service",
),
)
},
),
migrations.AlterField(
model_name="mumbleuser",
name="release",
field=models.TextField(
blank=True,
editable=False,
help_text="Client release. For official releases, this equals the version. For snapshots and git compiles, this will be something else.",
max_length=254,
null=True,
verbose_name="Mumble Release",
),
),
]

View File

@ -89,7 +89,7 @@ class MumbleUser(AbstractServiceModel):
max_length=254, max_length=254,
blank=True, blank=True,
editable=False, editable=False,
help_text="Client release. For official releases, this equals the version. For snapshots and git compiles, this will be something else." help_text="The Mumble Release the user last authenticated with"
) )
version = models.IntegerField( version = models.IntegerField(
verbose_name="Mumble Version", verbose_name="Mumble Version",
@ -157,5 +157,4 @@ class MumbleUser(AbstractServiceModel):
class Meta: class Meta:
permissions = ( permissions = (
("access_mumble", "Can access the Mumble service"), ("access_mumble", "Can access the Mumble service"),
("view_connection_history", "Can access the connection history of the Mumble service"),
) )

View File

@ -1,232 +0,0 @@
{% extends "allianceauth/base-bs5.html" %}
{% load aa_i18n %}
{% load i18n %}
{% block page_title %}
{% translate "Mumble" %}
{% endblock page_title %}
{% block header_nav_brand %}
{% trans "Mumble History" %} - {{ mumble_url }}
{% endblock header_nav_brand %}
{% block header_nav_collapse_left %}
{% endblock header_nav_collapse_left %}
{% block header_nav_collapse_right %}
{% endblock header_nav_collapse_right %}
{% block content %}
<div class="card col-lg-12 mb-3">
<div class="card-header">
<span class="card-title">{% translate "Server Connection History" %}</span>
</div>
<div class="card-body">
<div class="table-responsive">
<table class="table w-100" id="table-mumble-connection-history">
<thead>
<tr>
<th class="text-start">{% translate "User" %}</th>
<th class="text-start">{% translate "Displayed Name" %}</th>
<th class="text-start">{% translate "Release" %}</th>
<th class="text-start">{% translate "Version" %}</th>
<th class="text-end">{% translate "Last Connect" %}</th>
<th class="text-end">{% translate "Last Disconnect" %}</th>
</tr>
</thead>
</table>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-6">
<div class="card">
<div class="card-header">
<span class="card-title">{% translate "Server Connection Breakdown" %}</span>
</div>
<div class="card-body">
<canvas id="pieChart"></canvas> <!-- Canvas element for the pie chart -->
</div>
</div>
</div>
<div class="col-lg-6">
<div class="card">
<div class="card-header">
<span class="card-title">{% translate "Server Connection Breakdown" %}</span>
</div>
<div class="card-body">
<div class="table-responsive">
<table class="table w-100" id="table-mumble-connection-stats">
<thead>
<tr>
<th class="text-start">{% translate "Version" %}</th>
<th class="text-end">{% translate "Number" %}</th>
</tr>
</thead>
</table>
</div>
</div>
</div>
</div>
</div>
{% endblock content %}
{% block extra_javascript %}
{% include "bundles/datatables-js-bs5.html" %}
{% include "bundles/filterdropdown-js.html" %}
{% include "bundles/chart-js.html" %}
{% include "bundles/moment-js.html" with locale=True %}
{% get_datatables_language_static LANGUAGE_CODE as DT_LANG_PATH %}
<script>
$(document).ready(function () {
const MUMBLESTATS_DATETIME_FORMAT = 'LLL';
'use strict';
$("#table-mumble-connection-history").DataTable({
language: {url: '{{ DT_LANG_PATH }}'},
ajax: {
url: '{% url "mumble:connection_history_data" %}',
dataSrc: 'connection_history_data',
},
columns: [
{ data: 'user' },
{ data: 'display_name' },
{ data: 'release' },
{ data: 'version' },
{
data: 'last_connect',
render: {
_: (data) => {
return data === null
? ''
: moment(data)
.utc()
.format(MUMBLESTATS_DATETIME_FORMAT);
},
sort: (data) => {
return data === null ? '' : data;
}
},
className: 'text-end',
},
{
data: 'last_disconnect',
render: {
_: (data) => {
return data === null
? ''
: moment(data)
.utc()
.format(MUMBLESTATS_DATETIME_FORMAT);
},
sort: (data) => {
return data === null ? '' : data;
}
},
className: 'text-end',
},
],
order: [[4, 'desc']],
processing: true,
stateSave: true,
stateDuration: 0,
filterDropDown: {
columns: [
{
idx: 2,
},
{
idx: 3,
},
],
bootstrap: true,
bootstrap_version: 5,
},
});
$("#table-mumble-connection-stats").DataTable({
language: {url: '{{ DT_LANG_PATH }}'},
ajax: {
url: '{% url "mumble:release_counts_data" %}',
dataSrc: 'release_counts_data',
},
columns: [
{ data: 'release' },
{ data: 'user_count', className: 'text-end' },
],
order: [[1, 'desc']],
processing: true,
stateSave: true,
stateDuration: 0,
});
// Initialize empty Pie chart
const elementBody = document.querySelector('body');
const elementBodyCss = getComputedStyle(elementBody);
const ctx = document.getElementById('pieChart').getContext('2d');
const pieChart = new Chart(ctx, {
type: 'pie',
data: {
labels: [], // Initially empty
datasets: [
{
label: 'Server Connection Breakdown',
data: [], // Initially empty
backgroundColor: [
'rgba(255, 99, 132, 0.2)',
'rgba(54, 162, 235, 0.2)',
'rgba(255, 206, 86, 0.2)'
],
borderColor: [
'rgba(255, 99, 132, 1)',
'rgba(54, 162, 235, 1)',
'rgba(255, 206, 86, 1)'
],
borderWidth: 1
}
]
},
options: {
responsive: true,
plugins: {
legend: {
position: 'top'
}
}
}
});
Chart.defaults.color = elementBodyCss.color;
// AJAX call to dynamically update the chart
$.ajax({
url: '{% url "mumble:release_pie_chart_data" %}', // Your Django view URL that returns chart data
method: "GET",
success: (data) => {
// Replace chart data with the data from the AJAX response
pieChart.data.labels = data.labels; // Set the new labels
pieChart.data.datasets[0].data = data.values; // Set the new values
// Update the chart to reflect the new data
pieChart.update();
},
error: (xhr, status, error) => {
console.error('Error fetching pie chart data:', status, error);
},
});
});
</script>
{% endblock extra_javascript %}
{% block extra_css %}
{% include "bundles/datatables-css-bs5.html" %}
{% endblock extra_css %}

View File

@ -48,9 +48,4 @@
</a> </a>
{% endif %} {% endif %}
{% endif %} {% endif %}
{% if request.user.is_superuser %}
<a class="btn btn-primary" type="button" id="btnMumbleConnectionHistory" href="{% url 'mumble:connection_history' %}" title="{% translate 'Mumble Connection History' %}">
<i class="fa-solid fa-clock-rotate-left"></i> History
</a>
{% endif %}
{% endblock %} {% endblock %}

View File

@ -10,10 +10,6 @@ module_urls = [
path('deactivate/', views.DeleteMumbleView.as_view(), name='deactivate'), path('deactivate/', views.DeleteMumbleView.as_view(), name='deactivate'),
path('reset_password/', views.ResetPasswordMumbleView.as_view(), name='reset_password'), path('reset_password/', views.ResetPasswordMumbleView.as_view(), name='reset_password'),
path('set_password/', views.SetPasswordMumbleView.as_view(), name='set_password'), path('set_password/', views.SetPasswordMumbleView.as_view(), name='set_password'),
path('connection_history/', views.connection_history, name="connection_history"),
path('ajax/connection_history_data', views.connection_history_data, name="connection_history_data"),
path('ajax/release_counts_data', views.release_counts_data, name="release_counts_data"),
path('ajax/release_pie_chart_data', views.release_pie_chart_data, name="release_pie_chart_data"),
] ]
urlpatterns = [ urlpatterns = [

View File

@ -1,11 +1,5 @@
import logging import logging
from django.conf import settings
from django.contrib.auth.decorators import login_required, permission_required
from django.db.models import Count
from django.http import HttpResponse, JsonResponse
from django.shortcuts import render
from allianceauth.services.abstract import ( from allianceauth.services.abstract import (
BaseCreatePasswordServiceAccountView, BaseCreatePasswordServiceAccountView,
BaseDeactivateServiceAccountView, BaseDeactivateServiceAccountView,
@ -45,51 +39,3 @@ class ResetPasswordMumbleView(MumbleViewMixin, BaseResetPasswordServiceAccountVi
class SetPasswordMumbleView(MumbleViewMixin, BaseSetPasswordServiceAccountView): class SetPasswordMumbleView(MumbleViewMixin, BaseSetPasswordServiceAccountView):
form_class = MumblePasswordForm form_class = MumblePasswordForm
@login_required
@permission_required('mumble.view_connection_history')
def connection_history(request) -> HttpResponse:
context = {
"mumble_url": settings.MUMBLE_URL,
}
return render(request, 'services/mumble/mumble_connection_history.html', context)
@login_required
@permission_required("mumble.view_connection_history")
def connection_history_data(request) -> JsonResponse:
connection_history_data = MumbleUser.objects.all(
).values(
'user',
'display_name',
'release',
'version',
'last_connect',
'last_disconnect',
)
return JsonResponse({"connection_history_data": list(connection_history_data)})
@login_required
@permission_required("mumble.view_connection_history")
def release_counts_data(request) -> JsonResponse:
release_counts_data = MumbleUser.objects.values('release').annotate(user_count=Count('user_id')).order_by('release')
return JsonResponse({
"release_counts_data": list(release_counts_data),
})
@login_required
@permission_required("mumble.view_connection_history")
def release_pie_chart_data(request) -> JsonResponse:
release_counts = MumbleUser.objects.values('release').annotate(user_count=Count('user_id')).order_by('release')
return JsonResponse({
"labels": list(release_counts.values_list("release", flat=True)),
"values": list(release_counts.values_list("user_count", flat=True)),
})

View File

@ -112,7 +112,7 @@ def jabber_broadcast_view(request):
OpenfireManager.send_broadcast_message(group_to_send, message_to_send) OpenfireManager.send_broadcast_message(group_to_send, message_to_send)
messages.success(request, _(f'Sent Jabber broadcast to {group_to_send}')) messages.success(request, _('Sent Jabber broadcast to {}'.format(group_to_send)))
logger.info(f"Sent Jabber broadcast on behalf of user {request.user}") logger.info(f"Sent Jabber broadcast on behalf of user {request.user}")
except PingBotException as e: except PingBotException as e:
messages.error(request, e) messages.error(request, e)

View File

@ -17,10 +17,9 @@ class Teamspeak3User(models.Model):
("access_teamspeak3", "Can access the Teamspeak3 service"), ("access_teamspeak3", "Can access the Teamspeak3 service"),
) )
def __str__(self) -> str: def __str__(self):
return self.uid return self.uid
class TSgroup(models.Model): class TSgroup(models.Model):
ts_group_id = models.IntegerField(primary_key=True) ts_group_id = models.IntegerField(primary_key=True)
ts_group_name = models.CharField(max_length=30) ts_group_name = models.CharField(max_length=30)
@ -28,7 +27,7 @@ class TSgroup(models.Model):
class Meta: class Meta:
verbose_name = 'TS Group' verbose_name = 'TS Group'
def __str__(self) -> str: def __str__(self):
return self.ts_group_name return self.ts_group_name
@ -39,7 +38,7 @@ class AuthTS(models.Model):
class Meta: class Meta:
verbose_name = 'Auth / TS Group' verbose_name = 'Auth / TS Group'
def __str__(self) -> str: def __str__(self):
return self.auth_group.name return self.auth_group.name
@ -50,7 +49,7 @@ class UserTSgroup(models.Model):
class Meta: class Meta:
verbose_name = 'User TS Group' verbose_name = 'User TS Group'
def __str__(self) -> str: def __str__(self):
return self.user.name return self.user.name
@ -58,5 +57,5 @@ class StateGroup(models.Model):
state = models.ForeignKey(State, on_delete=models.CASCADE) state = models.ForeignKey(State, on_delete=models.CASCADE)
ts_group = models.ForeignKey(TSgroup, on_delete=models.CASCADE) ts_group = models.ForeignKey(TSgroup, on_delete=models.CASCADE)
def __str__(self) -> str: def __str__(self):
return str(self.pk) return self.pk

View File

@ -116,7 +116,8 @@ class Teamspeak3HooksTestCase(TestCase):
self.assertTrue(result) self.assertTrue(result)
self.assertTrue(manager.return_value.__enter__.return_value.delete_user.called) self.assertTrue(manager.return_value.__enter__.return_value.delete_user.called)
with self.assertRaises(ObjectDoesNotExist): with self.assertRaises(ObjectDoesNotExist):
_ = User.objects.get(username=self.member).teamspeak3 _ = User.objects.get(username=self.member)
def test_render_services_ctrl(self): def test_render_services_ctrl(self):
service = self.service() service = self.service()

View File

@ -1,6 +1,5 @@
import logging import logging
import telnetlib
from allianceauth.thirdparty.telnetlib import telnetlib
class ConnectionError: class ConnectionError:

View File

@ -18,7 +18,7 @@ class SrpFleetMain(models.Model):
class Meta: class Meta:
permissions = (('access_srp', 'Can access SRP module'),) permissions = (('access_srp', 'Can access SRP module'),)
def __str__(self) -> str: def __str__(self):
return self.fleet_name return self.fleet_name
@property @property
@ -46,5 +46,5 @@ class SrpUserRequest(models.Model):
srp_ship_name = models.CharField(max_length=254, default="") srp_ship_name = models.CharField(max_length=254, default="")
post_time = models.DateTimeField(default=timezone.now) post_time = models.DateTimeField(default=timezone.now)
def __str__(self) -> str: def __str__(self):
return self.character.character_name + ' SRP request for ' + self.srp_ship_name return self.character.character_name + ' SRP request for ' + self.srp_ship_name

View File

@ -1,5 +1,4 @@
{% extends "allianceauth/base-bs5.html" %} {% extends "allianceauth/base-bs5.html" %}
{% load aa_i18n %}
{% load i18n %} {% load i18n %}
{% load humanize %} {% load humanize %}
@ -169,8 +168,6 @@ ESC to cancel{% endblocktranslate %}" id="blah"></i></th>
{% include "bundles/moment-js.html" %} {% include "bundles/moment-js.html" %}
{% include "bundles/clipboard-js.html" %} {% include "bundles/clipboard-js.html" %}
{% get_datatables_language_static LANGUAGE_CODE as DT_LANG_PATH %}
<script> <script>
const clipboard = new ClipboardJS('.copy-text-fa-icon'); const clipboard = new ClipboardJS('.copy-text-fa-icon');
@ -240,7 +237,6 @@ ESC to cancel{% endblocktranslate %}" id="blah"></i></th>
}); });
elementTableSrpList.DataTable({ elementTableSrpList.DataTable({
language: {url: '{{ DT_LANG_PATH }}'},
"order": [[ 6, "asc" ]], "order": [[ 6, "asc" ]],
"paging": false, "paging": false,
"columnDefs": [ "columnDefs": [

View File

@ -1,247 +0,0 @@
{
"emptyTable": "Tabulka neobsahuje žádná data",
"info": "Zobrazuji _START_ až _END_ z celkem _TOTAL_ záznamů",
"infoEmpty": "Zobrazuji 0 až 0 z 0 záznamů",
"infoFiltered": "(filtrováno z celkem _MAX_ záznamů)",
"loadingRecords": "Načítám...",
"zeroRecords": "Žádné záznamy nebyly nalezeny",
"paginate": {
"first": "První",
"last": "Poslední",
"next": "Další",
"previous": "Předchozí"
},
"searchBuilder": {
"add": "Přidat podmínku",
"clearAll": "Smazat vše",
"condition": "Podmínka",
"conditions": {
"date": {
"after": "po",
"before": "před",
"between": "mezi",
"empty": "prázdné",
"equals": "rovno",
"not": "není",
"notBetween": "není mezi",
"notEmpty": "není prázdné"
},
"number": {
"between": "mezi",
"empty": "prázdné",
"equals": "rovno",
"gt": "větší",
"gte": "rovno a větší",
"lt": "menší",
"lte": "rovno a menší",
"not": "není",
"notBetween": "není mezi",
"notEmpty": "není prázdné"
},
"string": {
"contains": "obsahuje",
"empty": "prázdné",
"endsWith": "končí na",
"equals": "rovno",
"not": "není",
"notEmpty": "není prázdné",
"startsWith": "začíná na",
"notContains": "Podmínka",
"notStartsWith": "Nezačíná",
"notEndsWith": "Nekončí"
},
"array": {
"equals": "rovno",
"empty": "prázdné",
"contains": "obsahuje",
"not": "není",
"notEmpty": "není prázdné",
"without": "neobsahuje"
}
},
"data": "Sloupec",
"logicAnd": "A",
"logicOr": "NEBO",
"title": {
"0": "Rozšířený filtr",
"_": "Rozšířený filtr (%d)"
},
"value": "Hodnota",
"button": {
"0": "Rozšířený filtr",
"_": "Rozšířený filtr (%d)"
},
"deleteTitle": "Smazat filtrovací pravidlo",
"leftTitle": "Zrušení odsazení podmínky",
"rightTitle": "Odsazení podmínky"
},
"autoFill": {
"cancel": "Zrušit",
"fill": "Vyplň všechny buňky textem <i>%d<i><\/i><\/i>",
"fillHorizontal": "Vyplň všechny buňky horizontálně",
"fillVertical": "Vyplň všechny buňky vertikálně",
"info": "Příklad automatického vyplňování"
},
"buttons": {
"collection": "Kolekce <span class=\"ui-button-icon-primary ui-icon ui-icon-triangle-1-s\"><\/span>",
"copy": "Kopírovat",
"copyTitle": "Kopírovat do schránky",
"csv": "CSV",
"excel": "Excel",
"pageLength": {
"-1": "Zobrazit všechny řádky",
"_": "Zobrazit %d řádků",
"1": "Zobraz 1 řádek"
},
"pdf": "PDF",
"print": "Tisknout",
"colvis": "Viditelnost sloupců",
"colvisRestore": "Resetovat sloupce",
"copyKeys": "Zmáčkněte ctrl or u2318 + C pro zkopírování dat. Pro zrušení klikněte na tuto zprávu nebo zmáčkněte esc..",
"copySuccess": {
"1": "Zkopírován 1 řádek do schránky",
"_": "Zkopírováno %d řádků do schránky"
},
"createState": "Vytvořit Stav",
"removeAllStates": "Vymazat všechny Stavy",
"removeState": "Odstranit",
"renameState": "Odstranit",
"savedStates": "Uložit Stavy",
"stateRestore": "Stav %d",
"updateState": "Aktualizovat"
},
"searchPanes": {
"clearMessage": "Smazat vše",
"collapse": {
"0": "Vyhledávací Panely",
"_": "Vyhledávací Panely (%d)"
},
"count": "{total}",
"countFiltered": "{shown} ({total})",
"emptyPanes": "Žádné Vyhledávací Panely",
"loadMessage": "Načítám Vyhledávací Panely",
"title": "Aktivních filtrů - %d",
"showMessage": "Zobrazit Vše",
"collapseMessage": "Sbalit Vše"
},
"select": {
"cells": {
"1": "Vybrán 1 záznam",
"_": "Vybráno %d záznamů"
},
"columns": {
"1": "Vybrán 1 sloupec",
"_": "Vybráno %d sloupců"
},
"rows": {
"1": "Vybrán 1 řádek",
"_": "Vybráno %d řádků"
}
},
"aria": {
"sortAscending": "Aktivujte pro seřazení vzestupně",
"sortDescending": "Aktivujte pro seřazení sestupně"
},
"lengthMenu": "Zobrazit _MENU_ výsledků",
"processing": "Zpracovávání...",
"search": "Vyhledávání:",
"datetime": {
"previous": "Předchozí",
"next": "Další",
"hours": "Hodiny",
"minutes": "Minuty",
"seconds": "Vteřiny",
"unknown": "-",
"amPm": [
"Dopoledne",
"Odpoledne"
],
"months": [
"Leden",
"Únor",
"Březen",
"Duben",
"Květen",
"Červen",
"Červenec",
"Srpen",
"Září",
"Říjen",
"Listopad",
"Prosinec"
],
"weekdays": [
"Ne",
"Po",
"Út",
"St",
"Čt",
"Pá",
"So"
]
},
"editor": {
"close": "Zavřít",
"create": {
"button": "Nový",
"title": "Nový záznam",
"submit": "Vytvořit"
},
"edit": {
"button": "Změnit",
"title": "Změnit záznam",
"submit": "Aktualizovat"
},
"remove": {
"button": "Vymazat",
"title": "Smazání",
"submit": "Vymazat",
"confirm": {
"_": "Opravdu chcete smazat tyto %d řádky?",
"1": "Opravdu chcete smazat tento 1 řádek?"
}
},
"multi": {
"title": "Mnohočetný výběr",
"restore": "Vrátit změny",
"noMulti": "Toto pole může být editováno individuálně, ale ne jako soušást skupiny.",
"info": "Vybrané položky obsahují různé hodnoty pro tento vstup. Chcete-li upravit a nastavit všechny položky tohoto vstupu na stejnou hodnotu, klikněte nebo klepněte sem, jinak si zachovají své individuální hodnoty."
},
"error": {
"system": "Došlo k systémové chybě (&lt;a target=\"\\\" rel=\"nofollow\" href=\"\\\"&gt;Více informací&lt;\/a&gt;)."
}
},
"infoThousands": " ",
"decimal": ",",
"thousands": " ",
"stateRestore": {
"creationModal": {
"button": "Vytvořit",
"columns": {
"search": "Vyhledávání v buňce",
"visible": "Viditelnost buňky"
},
"name": "Název:",
"order": "Řazení",
"paging": "Stránkování",
"scroller": "Pozice skrolování",
"select": "Výběr",
"title": "Vytvořit nový Stav",
"toggleLabel": "Zahrnout",
"search": "Filtrování",
"searchBuilder": "Rozšířené filtrování"
},
"duplicateError": "Stav s tímto názvem ji existuje.",
"emptyError": "Název nemůže být prázný.",
"emptyStates": "Žádné uložené stavy",
"removeConfirm": "Opravdu chcete odstranbit %s?",
"removeError": "Chyba při odstraňování stavu.",
"removeJoiner": "a",
"removeSubmit": "Odstranit",
"removeTitle": "Odstranit Stav",
"renameButton": "Vymazat",
"renameLabel": "Nové jméno pro %s:",
"renameTitle": "Přejmenování Stavu"
},
"searchPlaceholder": "Příklad zástupného prvku"
}

View File

@ -1,243 +0,0 @@
{
"emptyTable": "Keine Daten in der Tabelle vorhanden",
"info": "_START_ bis _END_ von _TOTAL_ Einträgen",
"infoEmpty": "Keine Daten vorhanden",
"infoFiltered": "(gefiltert von _MAX_ Einträgen)",
"infoThousands": ".",
"loadingRecords": "Wird geladen ..",
"processing": "Bitte warten ..",
"paginate": {
"first": "Erste",
"next": "Nächste",
"last": "Letzte",
"previous": "Vorherige"
},
"aria": {
"sortAscending": ": aktivieren, um Spalte aufsteigend zu sortieren",
"sortDescending": ": aktivieren, um Spalte absteigend zu sortieren"
},
"select": {
"rows": {
"_": "%d Zeilen ausgewählt",
"1": "1 Zeile ausgewählt"
},
"cells": {
"1": "1 Zelle ausgewählt",
"_": "%d Zellen ausgewählt"
},
"columns": {
"1": "1 Spalte ausgewählt",
"_": "%d Spalten ausgewählt"
}
},
"buttons": {
"print": "Drucken",
"copy": "Kopieren",
"copyTitle": "In Zwischenablage kopieren",
"copySuccess": {
"_": "%d Zeilen kopiert",
"1": "1 Zeile kopiert"
},
"collection": "Aktionen <span class=\"ui-button-icon-primary ui-icon ui-icon-triangle-1-s\"><\/span>",
"colvis": "Spaltensichtbarkeit",
"colvisRestore": "Sichtbarkeit wiederherstellen",
"csv": "CSV",
"excel": "Excel",
"pageLength": {
"-1": "Alle Zeilen anzeigen",
"1": "Zeige 1 Zeile",
"_": "Zeige %d Zeilen"
},
"pdf": "PDF",
"createState": "Ansicht erstellen",
"removeAllStates": "Alle Ansichten entfernen",
"removeState": "Entfernen",
"renameState": "Umbenennen",
"savedStates": "Gespeicherte Ansicht",
"stateRestore": "Ansicht %d",
"updateState": "Aktualisieren",
"copyKeys": "Taste <i>STRG&lt;\\\/i&gt; oder <i>⌘&lt;\\\/i&gt; + <i>C&lt;\\\/i&gt; drücken um die Tabelle<br \/>in den Zwischenspeicher zu kopieren.<br \/><br \/>Um den Vorgang abzubrechen, Nachricht anklicken oder Escape-Taste drücken.<\/i><\/i><\/i>"
},
"autoFill": {
"cancel": "Abbrechen",
"fill": "Alle Zellen mit <i>%d<i> füllen<\/i><\/i>",
"fillHorizontal": "Alle horizontalen Zellen füllen",
"fillVertical": "Alle vertikalen Zellen füllen",
"info": "Automatische Vervollständigung"
},
"decimal": ",",
"search": "Suche:",
"searchBuilder": {
"add": "Bedingung hinzufügen",
"button": {
"0": "Such-Baukasten",
"_": "Such-Baukasten (%d)"
},
"condition": "Bedingung",
"conditions": {
"date": {
"after": "Nach",
"before": "Vor",
"between": "Zwischen",
"empty": "Leer",
"not": "Nicht",
"notBetween": "Nicht zwischen",
"notEmpty": "Nicht leer",
"equals": "Gleich"
},
"number": {
"between": "Zwischen",
"empty": "Leer",
"equals": "Entspricht",
"gt": "Größer als",
"gte": "Größer als oder gleich",
"lt": "Kleiner als",
"lte": "Kleiner als oder gleich",
"not": "Nicht",
"notBetween": "Nicht zwischen",
"notEmpty": "Nicht leer"
},
"string": {
"contains": "Beinhaltet",
"empty": "Leer",
"endsWith": "Endet mit",
"equals": "Entspricht",
"not": "Nicht",
"notEmpty": "Nicht leer",
"startsWith": "Startet mit",
"notContains": "enthält nicht",
"notStartsWith": "startet nicht mit",
"notEndsWith": "endet nicht mit"
},
"array": {
"equals": "ist gleich",
"empty": "ist leer",
"contains": "enthält",
"not": "ist ungleich",
"notEmpty": "ist nicht leer",
"without": "aber nicht"
}
},
"data": "Daten",
"deleteTitle": "Filterregel entfernen",
"leftTitle": "Äußere Kriterien",
"rightTitle": "Innere Kriterien",
"title": {
"0": "Such-Baukasten",
"_": "Such-Baukasten (%d)"
},
"value": "Wert",
"clearAll": "Alle entfernen",
"logicAnd": "Und",
"logicOr": "Oder"
},
"searchPanes": {
"clearMessage": "Leeren",
"collapse": {
"0": "Suchmasken",
"_": "Suchmasken (%d)"
},
"countFiltered": "{shown} ({total})",
"emptyPanes": "Keine Suchmasken",
"title": "Aktive Filter: %d",
"showMessage": "zeige Alle",
"collapseMessage": "Alle einklappen",
"count": "{total}",
"loadMessage": "Lade Suchmasken .."
},
"thousands": ".",
"zeroRecords": "Keine passenden Einträge gefunden",
"lengthMenu": "_MENU_ Zeilen anzeigen",
"datetime": {
"previous": "Vorher",
"next": "Nachher",
"hours": "Stunden",
"minutes": "Minuten",
"seconds": "Sekunden",
"unknown": "Unbekannt",
"weekdays": [
"Sonntag",
"Montag",
"Dienstag",
"Mittwoch",
"Donnerstag",
"Freitag",
"Samstag"
],
"months": [
"Januar",
"Februar",
"März",
"April",
"Mai",
"Juni",
"Juli",
"August",
"September",
"Oktober",
"November",
"Dezember"
]
},
"editor": {
"close": "Schließen",
"create": {
"button": "Neu",
"title": "Neuen Eintrag erstellen",
"submit": "Erstellen"
},
"remove": {
"confirm": {
"_": "Sollen %d Zeilen gelöscht werden?",
"1": "Soll diese Zeile gelöscht werden?"
},
"button": "Entfernen",
"title": "Entfernen",
"submit": "Entfernen"
},
"error": {
"system": "Ein Systemfehler ist aufgetreten"
},
"multi": {
"title": "Mehrere Werte",
"restore": "Änderungen zurücksetzen",
"noMulti": "Dieses Feld kann nur einzeln bearbeitet werden, nicht als Teil einer Mengen-Änderung.",
"info": "Die ausgewählten Elemente enthalten mehrere Werte für dieses Feld. Um alle Elemente für dieses Feld zu bearbeiten und auf denselben Wert zu setzen, hier klicken oder tippen, andernfalls behalten diese ihre individuellen Werte bei."
},
"edit": {
"button": "Bearbeiten",
"title": "Eintrag bearbeiten",
"submit": "Bearbeiten"
}
},
"searchPlaceholder": "Suchen...",
"stateRestore": {
"creationModal": {
"button": "Erstellen",
"columns": {
"search": "Spalten Suche",
"visible": "Spalten Sichtbarkeit"
},
"name": "Name:",
"order": "Sortieren",
"paging": "Seiten",
"scroller": "Scroll Position",
"search": "Suche",
"searchBuilder": "Such-Baukasten",
"select": "Auswahl",
"title": "Neue Ansicht erstellen",
"toggleLabel": "Inkludiert:"
},
"duplicateError": "Eine Ansicht mit diesem Namen existiert bereits.",
"emptyError": "Name darf nicht leer sein.",
"emptyStates": "Keine gespeicherten Ansichten",
"removeError": "Entfernen der Ansicht fehlgeschlagen.",
"removeJoiner": " und ",
"removeSubmit": "Entfernen",
"removeTitle": "Ansicht entfernen",
"renameButton": "Umbenennen",
"renameLabel": "Neuer Name für %s:",
"renameTitle": "Ansicht umbenennen",
"removeConfirm": "Sicher dass %s entfernt werden soll?"
}
}

View File

@ -1,244 +0,0 @@
{
"processing": "Procesando...",
"lengthMenu": "Mostrar _MENU_ registros",
"zeroRecords": "No se encontraron resultados",
"emptyTable": "Ningún dato disponible en esta tabla",
"infoEmpty": "Mostrando registros del 0 al 0 de un total de 0 registros",
"infoFiltered": "(filtrado de un total de _MAX_ registros)",
"search": "Buscar:",
"loadingRecords": "Cargando...",
"paginate": {
"first": "Primero",
"last": "Último",
"next": "Siguiente",
"previous": "Anterior"
},
"aria": {
"sortAscending": ": Activar para ordenar la columna de manera ascendente",
"sortDescending": ": Activar para ordenar la columna de manera descendente"
},
"buttons": {
"copy": "Copiar",
"colvis": "Visibilidad",
"collection": "Colección",
"colvisRestore": "Restaurar visibilidad",
"copyKeys": "Presione ctrl o u2318 + C para copiar los datos de la tabla al portapapeles del sistema. <br \/> <br \/> Para cancelar, haga clic en este mensaje o presione escape.",
"copySuccess": {
"1": "Copiada 1 fila al portapapeles",
"_": "Copiadas %ds fila al portapapeles"
},
"copyTitle": "Copiar al portapapeles",
"csv": "CSV",
"excel": "Excel",
"pageLength": {
"-1": "Mostrar todas las filas",
"_": "Mostrar %d filas"
},
"pdf": "PDF",
"print": "Imprimir",
"renameState": "Cambiar nombre",
"updateState": "Actualizar",
"createState": "Crear Estado",
"removeAllStates": "Remover Estados",
"removeState": "Remover",
"savedStates": "Estados Guardados",
"stateRestore": "Estado %d"
},
"autoFill": {
"cancel": "Cancelar",
"fill": "Rellene todas las celdas con <i>%d<\/i>",
"fillHorizontal": "Rellenar celdas horizontalmente",
"fillVertical": "Rellenar celdas verticalmente"
},
"decimal": ",",
"searchBuilder": {
"add": "Añadir condición",
"button": {
"0": "Constructor de búsqueda",
"_": "Constructor de búsqueda (%d)"
},
"clearAll": "Borrar todo",
"condition": "Condición",
"conditions": {
"date": {
"before": "Antes",
"between": "Entre",
"empty": "Vacío",
"equals": "Igual a",
"notBetween": "No entre",
"not": "Diferente de",
"after": "Después",
"notEmpty": "No Vacío"
},
"number": {
"between": "Entre",
"equals": "Igual a",
"gt": "Mayor a",
"gte": "Mayor o igual a",
"lt": "Menor que",
"lte": "Menor o igual que",
"notBetween": "No entre",
"notEmpty": "No vacío",
"not": "Diferente de",
"empty": "Vacío"
},
"string": {
"contains": "Contiene",
"empty": "Vacío",
"endsWith": "Termina en",
"equals": "Igual a",
"startsWith": "Empieza con",
"not": "Diferente de",
"notContains": "No Contiene",
"notStartsWith": "No empieza con",
"notEndsWith": "No termina con",
"notEmpty": "No Vacío"
},
"array": {
"not": "Diferente de",
"equals": "Igual",
"empty": "Vacío",
"contains": "Contiene",
"notEmpty": "No Vacío",
"without": "Sin"
}
},
"data": "Data",
"deleteTitle": "Eliminar regla de filtrado",
"leftTitle": "Criterios anulados",
"logicAnd": "Y",
"logicOr": "O",
"rightTitle": "Criterios de sangría",
"title": {
"0": "Constructor de búsqueda",
"_": "Constructor de búsqueda (%d)"
},
"value": "Valor"
},
"searchPanes": {
"clearMessage": "Borrar todo",
"collapse": {
"0": "Paneles de búsqueda",
"_": "Paneles de búsqueda (%d)"
},
"count": "{total}",
"countFiltered": "{shown} ({total})",
"emptyPanes": "Sin paneles de búsqueda",
"loadMessage": "Cargando paneles de búsqueda",
"title": "Filtros Activos - %d",
"showMessage": "Mostrar Todo",
"collapseMessage": "Colapsar Todo"
},
"select": {
"cells": {
"1": "1 celda seleccionada",
"_": "%d celdas seleccionadas"
},
"columns": {
"1": "1 columna seleccionada",
"_": "%d columnas seleccionadas"
},
"rows": {
"1": "1 fila seleccionada",
"_": "%d filas seleccionadas"
}
},
"thousands": ".",
"datetime": {
"previous": "Anterior",
"hours": "Horas",
"minutes": "Minutos",
"seconds": "Segundos",
"unknown": "-",
"amPm": [
"AM",
"PM"
],
"months": {
"0": "Enero",
"1": "Febrero",
"10": "Noviembre",
"11": "Diciembre",
"2": "Marzo",
"3": "Abril",
"4": "Mayo",
"5": "Junio",
"6": "Julio",
"7": "Agosto",
"8": "Septiembre",
"9": "Octubre"
},
"weekdays": {
"0": "Dom",
"1": "Lun",
"2": "Mar",
"4": "Jue",
"5": "Vie",
"3": "Mié",
"6": "Sáb"
},
"next": "Próximo"
},
"editor": {
"close": "Cerrar",
"create": {
"button": "Nuevo",
"title": "Crear Nuevo Registro",
"submit": "Crear"
},
"edit": {
"button": "Editar",
"title": "Editar Registro",
"submit": "Actualizar"
},
"remove": {
"button": "Eliminar",
"title": "Eliminar Registro",
"submit": "Eliminar",
"confirm": {
"_": "¿Está seguro de que desea eliminar %d filas?",
"1": "¿Está seguro de que desea eliminar 1 fila?"
}
},
"error": {
"system": "Ha ocurrido un error en el sistema (<a target=\"\\\" rel=\"\\ nofollow\" href=\"\\\">Más información&lt;\\\/a&gt;).<\/a>"
},
"multi": {
"title": "Múltiples Valores",
"restore": "Deshacer Cambios",
"noMulti": "Este registro puede ser editado individualmente, pero no como parte de un grupo.",
"info": "Los elementos seleccionados contienen diferentes valores para este registro. Para editar y establecer todos los elementos de este registro con el mismo valor, haga clic o pulse aquí, de lo contrario conservarán sus valores individuales."
}
},
"info": "Mostrando _START_ a _END_ de _TOTAL_ registros",
"stateRestore": {
"creationModal": {
"button": "Crear",
"name": "Nombre:",
"order": "Clasificación",
"paging": "Paginación",
"select": "Seleccionar",
"columns": {
"search": "Búsqueda de Columna",
"visible": "Visibilidad de Columna"
},
"title": "Crear Nuevo Estado",
"toggleLabel": "Incluir:",
"scroller": "Posición de desplazamiento",
"search": "Búsqueda",
"searchBuilder": "Búsqueda avanzada"
},
"removeJoiner": "y",
"removeSubmit": "Eliminar",
"renameButton": "Cambiar Nombre",
"duplicateError": "Ya existe un Estado con este nombre.",
"emptyStates": "No hay Estados guardados",
"removeTitle": "Remover Estado",
"renameTitle": "Cambiar Nombre Estado",
"emptyError": "El nombre no puede estar vacío.",
"removeConfirm": "¿Seguro que quiere eliminar %s?",
"removeError": "Error al eliminar el Estado",
"renameLabel": "Nuevo nombre para %s:"
},
"infoThousands": "."
}

View File

@ -1,245 +0,0 @@
{
"emptyTable": "Aucune donnée disponible dans le tableau",
"loadingRecords": "Chargement...",
"processing": "Traitement...",
"select": {
"rows": {
"_": "%d lignes sélectionnées",
"1": "1 ligne sélectionnée"
},
"cells": {
"1": "1 cellule sélectionnée",
"_": "%d cellules sélectionnées"
},
"columns": {
"1": "1 colonne sélectionnée",
"_": "%d colonnes sélectionnées"
}
},
"autoFill": {
"cancel": "Annuler",
"fill": "Remplir toutes les cellules avec <i>%d<\/i>",
"fillHorizontal": "Remplir les cellules horizontalement",
"fillVertical": "Remplir les cellules verticalement"
},
"searchBuilder": {
"conditions": {
"date": {
"after": "Après le",
"before": "Avant le",
"between": "Entre",
"empty": "Vide",
"not": "Différent de",
"notBetween": "Pas entre",
"notEmpty": "Non vide",
"equals": "Égal à"
},
"number": {
"between": "Entre",
"empty": "Vide",
"gt": "Supérieur à",
"gte": "Supérieur ou égal à",
"lt": "Inférieur à",
"lte": "Inférieur ou égal à",
"not": "Différent de",
"notBetween": "Pas entre",
"notEmpty": "Non vide",
"equals": "Égal à"
},
"string": {
"contains": "Contient",
"empty": "Vide",
"endsWith": "Se termine par",
"not": "Différent de",
"notEmpty": "Non vide",
"startsWith": "Commence par",
"equals": "Égal à",
"notContains": "Ne contient pas",
"notEndsWith": "Ne termine pas par",
"notStartsWith": "Ne commence pas par"
},
"array": {
"empty": "Vide",
"contains": "Contient",
"not": "Différent de",
"notEmpty": "Non vide",
"without": "Sans",
"equals": "Égal à"
}
},
"add": "Ajouter une condition",
"button": {
"0": "Recherche avancée",
"_": "Recherche avancée (%d)"
},
"clearAll": "Effacer tout",
"condition": "Condition",
"data": "Donnée",
"deleteTitle": "Supprimer la règle de filtrage",
"logicAnd": "Et",
"logicOr": "Ou",
"title": {
"0": "Recherche avancée",
"_": "Recherche avancée (%d)"
},
"value": "Valeur",
"leftTitle": "Désindenter le critère",
"rightTitle": "Indenter le critère"
},
"searchPanes": {
"clearMessage": "Effacer tout",
"count": "{total}",
"title": "Filtres actifs - %d",
"collapse": {
"0": "Volet de recherche",
"_": "Volet de recherche (%d)"
},
"countFiltered": "{shown} ({total})",
"emptyPanes": "Pas de volet de recherche",
"loadMessage": "Chargement du volet de recherche...",
"collapseMessage": "Réduire tout",
"showMessage": "Montrer tout"
},
"buttons": {
"collection": "Collection",
"colvis": "Visibilité colonnes",
"colvisRestore": "Rétablir visibilité",
"copy": "Copier",
"copySuccess": {
"1": "1 ligne copiée dans le presse-papier",
"_": "%d lignes copiées dans le presse-papier"
},
"copyTitle": "Copier dans le presse-papier",
"csv": "CSV",
"excel": "Excel",
"pageLength": {
"-1": "Afficher toutes les lignes",
"_": "Afficher %d lignes",
"1": "Afficher 1 ligne"
},
"pdf": "PDF",
"print": "Imprimer",
"copyKeys": "Appuyez sur ctrl ou u2318 + C pour copier les données du tableau dans votre presse-papier.",
"createState": "Créer un état",
"removeAllStates": "Supprimer tous les états",
"removeState": "Supprimer",
"renameState": "Renommer",
"savedStates": "États sauvegardés",
"stateRestore": "État %d",
"updateState": "Mettre à jour"
},
"decimal": ",",
"datetime": {
"previous": "Précédent",
"next": "Suivant",
"hours": "Heures",
"minutes": "Minutes",
"seconds": "Secondes",
"unknown": "-",
"amPm": [
"am",
"pm"
],
"months": {
"0": "Janvier",
"2": "Mars",
"3": "Avril",
"4": "Mai",
"5": "Juin",
"6": "Juillet",
"8": "Septembre",
"9": "Octobre",
"10": "Novembre",
"1": "Février",
"11": "Décembre",
"7": "Août"
},
"weekdays": [
"Dim",
"Lun",
"Mar",
"Mer",
"Jeu",
"Ven",
"Sam"
]
},
"editor": {
"close": "Fermer",
"create": {
"title": "Créer une nouvelle entrée",
"button": "Nouveau",
"submit": "Créer"
},
"edit": {
"button": "Editer",
"title": "Editer Entrée",
"submit": "Mettre à jour"
},
"remove": {
"button": "Supprimer",
"title": "Supprimer",
"submit": "Supprimer",
"confirm": {
"_": "Êtes-vous sûr de vouloir supprimer %d lignes ?",
"1": "Êtes-vous sûr de vouloir supprimer 1 ligne ?"
}
},
"multi": {
"title": "Valeurs multiples",
"info": "Les éléments sélectionnés contiennent différentes valeurs pour cette entrée. Pour modifier et définir tous les éléments de cette entrée à la même valeur, cliquez ou tapez ici, sinon ils conserveront leurs valeurs individuelles.",
"restore": "Annuler les modifications",
"noMulti": "Ce champ peut être modifié individuellement, mais ne fait pas partie d'un groupe. "
},
"error": {
"system": "Une erreur système s'est produite (<a target=\"\\\" rel=\"nofollow\" href=\"\\\">Plus d'information<\/a>)."
}
},
"stateRestore": {
"removeSubmit": "Supprimer",
"creationModal": {
"button": "Créer",
"order": "Tri",
"paging": "Pagination",
"scroller": "Position du défilement",
"search": "Recherche",
"select": "Sélection",
"columns": {
"search": "Recherche par colonne",
"visible": "Visibilité des colonnes"
},
"name": "Nom :",
"searchBuilder": "Recherche avancée",
"title": "Créer un nouvel état",
"toggleLabel": "Inclus :"
},
"renameButton": "Renommer",
"duplicateError": "Il existe déjà un état avec ce nom.",
"emptyError": "Le nom ne peut pas être vide.",
"emptyStates": "Aucun état sauvegardé",
"removeConfirm": "Voulez vous vraiment supprimer %s ?",
"removeError": "Échec de la suppression de l'état.",
"removeJoiner": "et",
"removeTitle": "Supprimer l'état",
"renameLabel": "Nouveau nom pour %s :",
"renameTitle": "Renommer l'état"
},
"info": "Affichage de _START_ à _END_ sur _TOTAL_ entrées",
"infoEmpty": "Affichage de 0 à 0 sur 0 entrées",
"infoFiltered": "(filtrées depuis un total de _MAX_ entrées)",
"lengthMenu": "Afficher _MENU_ entrées",
"paginate": {
"first": "Première",
"last": "Dernière",
"next": "Suivante",
"previous": "Précédente"
},
"zeroRecords": "Aucune entrée correspondante trouvée",
"aria": {
"sortAscending": " : activer pour trier la colonne par ordre croissant",
"sortDescending": " : activer pour trier la colonne par ordre décroissant"
},
"infoThousands": " ",
"search": "Rechercher :",
"thousands": " "
}

View File

@ -1,244 +0,0 @@
{
"infoFiltered": "(filtrati da _MAX_ elementi totali)",
"infoThousands": ".",
"loadingRecords": "Caricamento...",
"processing": "Elaborazione...",
"search": "Cerca:",
"paginate": {
"first": "Inizio",
"previous": "Precedente",
"next": "Successivo",
"last": "Fine"
},
"aria": {
"sortAscending": ": attiva per ordinare la colonna in ordine crescente",
"sortDescending": ": attiva per ordinare la colonna in ordine decrescente"
},
"autoFill": {
"cancel": "Annulla",
"fill": "Riempi tutte le celle con <i>%d<\/i>",
"fillHorizontal": "Riempi celle orizzontalmente",
"fillVertical": "Riempi celle verticalmente"
},
"buttons": {
"collection": "Collezione <span class=\"ui-button-icon-primary ui-icon ui-icon-triangle-1-s\"><\/span>",
"colvis": "Visibilità Colonna",
"colvisRestore": "Ripristina visibilità",
"copy": "Copia",
"copyKeys": "Premi ctrl o u2318 + C per copiare i dati della tabella nella tua clipboard di sistema.<br \/><br \/>Per annullare, clicca questo messaggio o premi ESC.",
"copySuccess": {
"1": "Copiata 1 riga nella clipboard",
"_": "Copiate %d righe nella clipboard"
},
"copyTitle": "Copia nella Clipboard",
"csv": "CSV",
"excel": "Excel",
"pageLength": {
"-1": "Mostra tutte le righe",
"_": "Mostra %d righe"
},
"pdf": "PDF",
"print": "Stampa",
"createState": "Crea stato",
"removeAllStates": "Rimuovi tutti gli stati",
"removeState": "Rimuovi",
"renameState": "Rinomina",
"savedStates": "Salva stato",
"stateRestore": "Ripristina stato",
"updateState": "Aggiorna"
},
"emptyTable": "Nessun dato disponibile nella tabella",
"info": "Risultati da _START_ a _END_ di _TOTAL_ elementi",
"infoEmpty": "Risultati da 0 a 0 di 0 elementi",
"lengthMenu": "Mostra _MENU_ elementi",
"searchBuilder": {
"add": "Aggiungi Condizione",
"button": {
"0": "Generatore di Ricerca",
"_": "Generatori di Ricerca (%d)"
},
"clearAll": "Pulisci Tutto",
"condition": "Condizione",
"conditions": {
"date": {
"after": "Dopo",
"before": "Prima",
"between": "Tra",
"empty": "Vuoto",
"equals": "Uguale A",
"not": "Non",
"notBetween": "Non Tra",
"notEmpty": "Non Vuoto"
},
"number": {
"between": "Tra",
"empty": "Vuoto",
"equals": "Uguale A",
"gt": "Maggiore Di",
"gte": "Maggiore O Uguale A",
"lt": "Minore Di",
"lte": "Minore O Uguale A",
"not": "Non",
"notBetween": "Non Tra",
"notEmpty": "Non Vuoto"
},
"string": {
"contains": "Contiene",
"empty": "Vuoto",
"endsWith": "Finisce Con",
"equals": "Uguale A",
"not": "Non",
"notEmpty": "Non Vuoto",
"startsWith": "Inizia Con",
"notContains": "Non Contiene",
"notStartsWith": "Non Inizia Con",
"notEndsWith": "Non Finisce Con"
},
"array": {
"equals": "Uguale A",
"empty": "Vuoto",
"contains": "Contiene",
"not": "Non",
"notEmpty": "Non Vuoto",
"without": "Senza"
}
},
"data": "Dati",
"deleteTitle": "Elimina regola filtro",
"leftTitle": "Criterio di Riduzione Rientro",
"logicAnd": "E",
"logicOr": "O",
"rightTitle": "Criterio di Aumento Rientro",
"title": {
"0": "Generatore di Ricerca",
"_": "Generatori di Ricerca (%d)"
},
"value": "Valore"
},
"searchPanes": {
"clearMessage": "Pulisci Tutto",
"collapse": {
"0": "Pannello di Ricerca",
"_": "Pannelli di Ricerca (%d)"
},
"count": "{total}",
"countFiltered": "{shown} ({total})",
"emptyPanes": "Nessun Pannello di Ricerca",
"loadMessage": "Caricamento Pannello di Ricerca",
"title": "Filtri Attivi - %d",
"showMessage": "Mostra tutto",
"collapseMessage": "Espandi tutto"
},
"select": {
"cells": {
"1": "1 cella selezionata",
"_": "%d celle selezionate"
},
"columns": {
"1": "1 colonna selezionata",
"_": "%d colonne selezionate"
},
"rows": {
"1": "1 riga selezionata",
"_": "%d righe selezionate"
}
},
"zeroRecords": "Nessun elemento corrispondente trovato",
"datetime": {
"amPm": [
"am",
"pm"
],
"hours": "ore",
"minutes": "minuti",
"next": "successivo",
"previous": "precedente",
"seconds": "secondi",
"unknown": "sconosciuto",
"weekdays": [
"Dom",
"Lun",
"Mar",
"Mer",
"Gio",
"Ven",
"Sab"
],
"months": [
"Gennaio",
"Febbraio",
"Marzo",
"Aprile",
"Maggio",
"Giugno",
"Luglio",
"Agosto",
"Settembre",
"Ottobre",
"Novembre",
"Dicembre"
]
},
"editor": {
"close": "Chiudi",
"create": {
"button": "Nuovo",
"submit": "Aggiungi",
"title": "Aggiungi nuovo elemento"
},
"edit": {
"button": "Modifica",
"submit": "Modifica",
"title": "Modifica elemento"
},
"error": {
"system": "Errore del sistema."
},
"multi": {
"info": "Gli elementi selezionati contengono valori diversi. Per modificare e impostare tutti gli elementi per questa selezione allo stesso valore, premi o clicca qui, altrimenti ogni cella manterrà il suo valore attuale.",
"noMulti": "Questa selezione può essere modificata individualmente, ma non se fa parte di un gruppo.",
"restore": "Annulla le modifiche",
"title": "Valori multipli"
},
"remove": {
"button": "Rimuovi",
"confirm": {
"_": "Sei sicuro di voler cancellare %d righe?",
"1": "Sei sicuro di voler cancellare 1 riga?"
},
"submit": "Rimuovi",
"title": "Rimuovi"
}
},
"thousands": ".",
"decimal": ",",
"stateRestore": {
"creationModal": {
"button": "Crea",
"columns": {
"search": "Colonna Cerca",
"visible": "Colonna Visibilità"
},
"name": "Nome:",
"order": "Ordinamento",
"paging": "Paginazione",
"scroller": "Scorri posizione",
"search": "Ricerca",
"searchBuilder": "Form di Ricerca",
"select": "Seleziona",
"title": "Crea nuovo Stato",
"toggleLabel": "Includi:"
},
"duplicateError": "Nome stato già presente",
"emptyError": "Il nome è obbligatorio",
"emptyStates": "Non ci sono stati salvati",
"removeConfirm": "Sei sicuro di eliminare lo Stato %s?",
"removeError": "Errore durante l'eliminazione dello Stato",
"removeJoiner": "e",
"removeSubmit": "Elimina",
"removeTitle": "Elimina Stato",
"renameButton": "Rinomina",
"renameLabel": "Nuovo nome per %s:",
"renameTitle": "Rinomina Stato"
}
}

View File

@ -1,84 +0,0 @@
{
"emptyTable": "テーブルにデータがありません",
"info": " _TOTAL_ 件中 _START_ から _END_ まで表示",
"infoEmpty": " 0 件中 0 から 0 まで表示",
"infoFiltered": "(全 _MAX_ 件より抽出)",
"infoThousands": ",",
"lengthMenu": "_MENU_ 件表示",
"loadingRecords": "読み込み中...",
"processing": "処理中...",
"search": "検索:",
"zeroRecords": "一致するレコードがありません",
"paginate": {
"first": "先頭",
"last": "最終",
"next": "次",
"previous": "前"
},
"aria": {
"sortAscending": ": 列を昇順に並べ替えるにはアクティブにする",
"sortDescending": ": 列を降順に並べ替えるにはアクティブにする"
},
"thousands": ",",
"buttons": {
"colvis": "項目の表示\/非表示",
"csv": "CSVをダウンロード",
"collection": "コレクション"
},
"searchBuilder": {
"add": "条件を追加",
"button": {
"0": "カスタムサーチ",
"_": "カスタムサーチ (%d)"
},
"clearAll": "すべての条件をクリア",
"condition": "条件",
"conditions": {
"date": {
"after": "次の日付以降",
"before": "次の日付以前",
"between": "次の期間に含まれる",
"empty": "空白",
"equals": "次の日付と等しい",
"not": "次の日付と等しくない",
"notBetween": "次の期間に含まれない",
"notEmpty": "空白ではない"
},
"number": {
"between": "次の値の間に含まれる",
"empty": "空白",
"equals": "次の値と等しい",
"gt": "次の値よりも大きい",
"gte": "次の値以上",
"lt": "次の値未満",
"lte": "次の値以下",
"not": "次の値と等しくない",
"notBetween": "次の値の間に含まれない",
"notEmpty": "空白ではない"
},
"string": {
"contains": "次の文字を含む",
"empty": "空白",
"endsWith": "次の文字で終わる",
"equals": "次の文字と等しい",
"not": "次の文字と等しくない",
"notEmpty": "空白ではない",
"startsWith": "次の文字から始まる",
"notContains": "次の文字を含まない",
"notStartsWith": "次の文字で始まらない",
"notEndsWith": "次の文字で終わらない"
}
},
"data": "項目",
"title": {
"0": "カスタムサーチ",
"_": "カスタムサーチ (%d)"
},
"value": "値"
},
"autoFill": {
"cancel": "キャンセル",
"fillHorizontal": "横でセルを書き込む",
"fillVertical": "縦でセルを書き込む"
}
}

View File

@ -1,122 +0,0 @@
{
"emptyTable": "데이터가 없습니다",
"info": "_START_ - _END_ \/ _TOTAL_",
"infoEmpty": "0 - 0 \/ 0",
"infoFiltered": "(총 _MAX_ 개)",
"infoThousands": ",",
"lengthMenu": "페이지당 줄수 _MENU_",
"loadingRecords": "읽는중...",
"processing": "처리중...",
"search": "검색:",
"zeroRecords": "검색 결과가 없습니다",
"paginate": {
"first": "처음",
"last": "마지막",
"next": "다음",
"previous": "이전"
},
"aria": {
"sortAscending": ": 오름차순 정렬",
"sortDescending": ": 내림차순 정렬"
},
"buttons": {
"copyKeys": "ctrl키 나 u2318 + C키로 테이블 데이터를 시스텝 복사판에서 복사하고 취소하려면 이 메시지를 클릭하거나 ESC키를 누르면됩니다. to copy the table data to your system clipboard. To cancel, click this message or press escape.",
"copySuccess": {
"_": "%d행을 복사판에서 복사됨",
"1": "1행을 복사판에서 복사됨"
},
"copyTitle": "복사판에서 복사",
"csv": "CSV",
"pageLength": {
"-1": "모든 행 보기",
"_": "%d행 보기"
},
"pdf": "PDF",
"print": "인쇄",
"collection": "집합 <span class=\"ui-button-icon-primary ui-icon ui-icon-triangle-1-s\"><\/span>",
"colvis": "컬럼 보기",
"colvisRestore": "보기 복원",
"copy": "복사",
"excel": "엑셀"
},
"searchBuilder": {
"add": "조건 추가",
"button": {
"0": "빌더 조회",
"_": "빌더 조회(%d)"
},
"clearAll": "모두 지우기",
"condition": "조건",
"data": "데이터",
"deleteTitle": "필터 규칙을 삭제",
"logicAnd": "And",
"logicOr": "Or",
"title": {
"0": "빌더 조회",
"_": "빌더 조회(%d)"
},
"value": "값"
},
"autoFill": {
"cancel": "취소",
"fill": "모든 셀에서 <i>%d<i>을(를) 삽입<\/i><\/i>",
"fillHorizontal": "수평 셀에서 값을 삽입",
"fillVertical": "수직 설에서 값을 삽입"
},
"datetime": {
"previous": "이전",
"next": "다음",
"hours": "시",
"minutes": "분",
"seconds": "초",
"unknown": "-",
"amPm": [
"오전",
"오후"
],
"weekdays": [
"일",
"월",
"화",
"수",
"목",
"금",
"토"
],
"months": [
"1월",
"2월",
"3월",
"4월",
"5월",
"6월",
"7월",
"8월",
"9월",
"10월",
"11월",
"12월"
]
},
"editor": {
"close": "닫기",
"create": {
"button": "추가",
"title": "항목 추가",
"submit": "완료"
},
"edit": {
"button": "수정",
"title": "항목 수정",
"submit": "완료"
},
"remove": {
"button": "삭제",
"title": "항목 삭제",
"submit": "완료"
},
"error": {
"system": "에러가 발생하였습니다 (&lt;a target=\"\\\" rel=\"nofollow\" href=\"\\\"&gt;자세한 정보&lt;\/a&gt;)."
}
}
}

Some files were not shown because too many files have changed in this diff Show More