Compare commits

...

38 Commits

Author SHA1 Message Date
Ariel Rin
773bf05b12 Merge branch 'translations_7f31a07ccd4e4a66b1dd7b6bc2dbddb5' into 'master'
Updates for project Alliance Auth

See merge request allianceauth/allianceauth!1699
2025-04-29 02:57:20 +00:00
Ariel Rin
a3ea0c65a1 Merge branch 'timerboard-skyhooks' into 'master'
Add a new `theft` timer type for skyhooks

See merge request allianceauth/allianceauth!1708
2025-04-29 02:52:38 +00:00
Ariel Rin
5e526da11c Merge branch 'add-apply_offset-to-esi_cleanup_token-task' into 'master'
[ADD] `apply_offset` to `esi_cleanup_token` task

See merge request allianceauth/allianceauth!1709
2025-04-29 02:49:56 +00:00
Ariel Rin
5c79265f90 Merge branch 'services-grid' into 'master'
[FIX] Top margin for service controls

See merge request allianceauth/allianceauth!1711
2025-04-29 02:48:11 +00:00
Ariel Rin
eb0134e716 Merge branch 'menu-separator' into 'master'
[ADD] Menu separator

See merge request allianceauth/allianceauth!1712
2025-04-29 02:48:00 +00:00
Ariel Rin
afde1f4729 Merge branch 'typehint-object-managers' into 'master'
Typehint object managers

See merge request allianceauth/allianceauth!1713
2025-04-29 02:47:12 +00:00
Ariel Rin
5c6dda0eac Typehint object managers 2025-04-29 02:47:11 +00:00
Ariel Rin
af453bc772 Merge branch 'aa_i18n-addition' into 'master'
[ADD] Temaplatetag for path relative to `static`

See merge request allianceauth/allianceauth!1714
2025-04-29 02:46:56 +00:00
Ariel Rin
e13674e886 Merge branch 'translatable-app-names' into 'master'
[CHANGE] Made app names translatable in Django admin

See merge request allianceauth/allianceauth!1715
2025-04-29 02:45:48 +00:00
Ariel Rin
e3e856b826 Merge branch 'admin-overview' into 'master'
Remove unused {% if %} tag

See merge request allianceauth/allianceauth!1718
2025-04-29 02:42:35 +00:00
T'rahk Rokym
9d1cd23a8f Remove unused {% if %} tag 2025-04-21 16:50:04 +02:00
Peter Pfeufer
148f7c116f
[CHANGE] Made app names translatable in Django admin 2025-04-10 07:08:16 +02:00
Peter Pfeufer
33e7134d6f
[ADD] Temaplatetag for path relative to static
AA-GDPR needs this
2025-04-09 20:54:51 +02:00
Peter Pfeufer
fb799551aa
[CHANGE] Move what ever is possible to our framework CSS 2025-04-06 22:22:54 +02:00
Peter Pfeufer
7b95051fe1
[ADD] Menu separator
Between `#nav-right` and `#nav-right-character-control`. Only visible when `#nav-right` has menu items.
2025-04-06 22:01:54 +02:00
Peter Pfeufer
efb6a6db4f
[FIX] Top margin for service controls 2025-04-05 23:49:58 +02:00
Peter Pfeufer
478aa1aa12
[ADD] apply_offset to esi_cleanup_token task 2025-04-03 00:59:04 +02:00
T'rahk Rokym
751e55ed6c Add a new theft timer type for skyhooks 2025-03-26 22:09:43 +01:00
Ariel Rin
9dad53f763 Merge branch 'master' into 'master'
Switch the doc example to use group instead of chain for long running tasks

See merge request allianceauth/allianceauth!1703
2025-03-26 01:48:29 +00:00
Ariel Rin
2d57064a7a Merge branch 'supervisor-config-template-updates' into 'master'
[CHANGE] Update supervisor.conf template

See merge request allianceauth/allianceauth!1700
2025-03-26 01:47:58 +00:00
Ariel Rin
833d12cf66 Merge branch 'opengraph-template' into 'master'
[ADD] Opengraph Template

See merge request allianceauth/allianceauth!1701
2025-03-26 01:47:35 +00:00
Ariel Rin
7b56caa4cb Merge branch 'perms_fix' into 'master'
Use the mumble.view_connection_history perm not superuser for Mumble service statistics

See merge request allianceauth/allianceauth!1702
2025-03-26 01:47:12 +00:00
Ariel Rin
5752644122 Merge branch 'fix-logo-height' into 'master'
[FIX] `logo_height` variable name

See merge request allianceauth/allianceauth!1704
2025-03-26 01:46:12 +00:00
Ariel Rin
cadc0cb534 Merge branch 'page-header' into 'master'
[CHANGE] Wrap page header in `header` element

See merge request allianceauth/allianceauth!1705
2025-03-26 01:46:04 +00:00
Ariel Rin
dcdab5ae1f Merge branch 'fix-spelling' into 'master'
[FIX] Spelling (It's EVE time, not Eve time)

See merge request allianceauth/allianceauth!1706
2025-03-26 01:45:58 +00:00
Ariel Rin
d64e896288 Merge branch 'fix-scrollbar-positioning' into 'master'
[FIX] Scrollbar positioning in content area

See merge request allianceauth/allianceauth!1707
2025-03-26 01:45:38 +00:00
Peter Pfeufer
500d8ede32
[FIX] Scrollbar positioning in content area 2025-03-24 17:47:40 +01:00
Peter Pfeufer
f4c5c7f6db
[FIX] Spelling (It's EVE time, not Eve time) 2025-03-24 15:14:30 +01:00
Peter Pfeufer
43e1be4032
[CHANGE] Move margin class to header element 2025-03-24 14:49:51 +01:00
Peter Pfeufer
702def2a4d
[CHANGE] Wrap page header in header element 2025-03-24 13:34:11 +01:00
Peter Pfeufer
a34baf4154
[FIX] logo_height variable name 2025-03-22 17:37:10 +01:00
r0kym
4de0774f15 Switch the doc example to use group instead of chain for long running tasks 2025-03-20 18:47:19 +01:00
Aaron Kable
83d2dfc7d9 use the view_connection_history perm not superuser 2025-03-20 19:11:08 +08:00
Peter Pfeufer
c93afd2d68
[ADD] Site name and URL 2025-03-18 21:40:47 +01:00
Peter Pfeufer
b7bacd11af
[CHANGE] Bring public base templkate in line with the non-public version 2025-03-18 18:30:00 +01:00
Peter Pfeufer
f26835fae0
[ADD] Opengraph Template for easier override 2025-03-18 18:29:22 +01:00
Peter Pfeufer
4edb7cb678
[CHANGE] Assignment format to INI style
The supervisor.conf file uses INI style, so the format should reflect this.
2025-03-16 10:15:36 +01:00
Peter Pfeufer
2ce9ba997f
[CHANGE] Update supervisor.conf template
Use `%(program_name)s` variable for logfile names, which makes it easier to avoid possible copy/paste issues and mistakes.
2025-03-16 10:11:27 +01:00
65 changed files with 266 additions and 112 deletions

View File

@ -1,6 +1,8 @@
from django.apps import AppConfig
from django.utils.translation import gettext_lazy as _
class AnalyticsConfig(AppConfig):
name = 'allianceauth.analytics'
label = 'analytics'
verbose_name = _('Analytics')

View File

@ -1,10 +1,12 @@
from django.apps import AppConfig
from django.core.checks import register, Tags
from django.utils.translation import gettext_lazy as _
class AuthenticationConfig(AppConfig):
name = "allianceauth.authentication"
label = "authentication"
verbose_name = _("Authentication")
def ready(self):
from allianceauth.authentication import checks, signals # noqa: F401

View File

@ -1,4 +1,5 @@
import logging
from typing import ClassVar
from django.contrib.auth.models import User, Permission
from django.db import models, transaction
@ -27,7 +28,7 @@ class State(models.Model):
help_text="Factions to whose members this state is available.")
public = models.BooleanField(default=False, help_text="Make this state available to any character.")
objects = StateManager()
objects: ClassVar[StateManager] = StateManager()
class Meta:
ordering = ['-priority']
@ -137,8 +138,10 @@ class UserProfile(models.Model):
sender=self.__class__, user=self.user, state=self.state
)
def __str__(self):
def __str__(self) -> str:
return str(self.user)
class CharacterOwnership(models.Model):
class Meta:
default_permissions = ('change', 'delete')
@ -148,7 +151,7 @@ class CharacterOwnership(models.Model):
owner_hash = models.CharField(max_length=28, unique=True)
user = models.ForeignKey(User, on_delete=models.CASCADE, related_name='character_ownerships')
objects = CharacterOwnershipManager()
objects: ClassVar[CharacterOwnershipManager] = CharacterOwnershipManager()
def __str__(self):
return f"{self.user}: {self.character}"

View File

@ -1,24 +1,24 @@
{% load theme_tags %}
{% load static %}
<!DOCTYPE html>
<html lang="en">
<html lang="en" {% theme_html_tags %}>
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<!-- TODO Bundle all the site specific stuff up into its own template for easy override -->
<meta property="og:title" content="{{ SITE_NAME }}">
<meta property="og:image" content="{{ SITE_URL }}{% static 'allianceauth/icons/apple-touch-icon.png' %}">
<meta property="og:description" content="Alliance Auth - An auth system for EVE Online to help in-game organizations manage online service access.">
<!-- End Required meta tags -->
<!-- Meta tags -->
{% include 'allianceauth/opengraph.html' %}
{% include 'allianceauth/icons.html' %}
<!-- Meta tags -->
<title>{% block title %}{% block page_title %}{% endblock page_title %} - {{ SITE_NAME }}{% endblock title %}</title>
{% theme_css %}
{% include 'bundles/fontawesome.html' %}
{% include 'bundles/auth-framework-css.html' %}
{% block extra_include %}
{% endblock %}

View File

@ -1,6 +1,8 @@
from django.apps import AppConfig
from django.utils.translation import gettext_lazy as _
class CorpUtilsConfig(AppConfig):
name = 'allianceauth.corputils'
label = 'corputils'
verbose_name = _('Corporation Stats')

View File

@ -1,5 +1,6 @@
import logging
import os
from typing import ClassVar
from allianceauth.authentication.models import CharacterOwnership, UserProfile
from bravado.exception import HTTPForbidden
@ -40,9 +41,9 @@ class CorpStats(models.Model):
verbose_name = "corp stats"
verbose_name_plural = "corp stats"
objects = CorpStatsManager()
objects: ClassVar[CorpStatsManager] = CorpStatsManager()
def __str__(self):
def __str__(self) -> str:
return f"{self.__class__.__name__} for {self.corp}"
def update(self):

View File

@ -3,6 +3,7 @@ Crontab App Config
"""
from django.apps import AppConfig
from django.utils.translation import gettext_lazy as _
class CrontabConfig(AppConfig):
@ -12,3 +13,4 @@ class CrontabConfig(AppConfig):
name = "allianceauth.crontab"
label = "crontab"
verbose_name = _("Crontab")

View File

@ -1,6 +1,8 @@
from django.apps import AppConfig
from django.utils.translation import gettext_lazy as _
class EveonlineConfig(AppConfig):
name = 'allianceauth.eveonline'
label = 'eveonline'
verbose_name = _('EVE Online')

View File

@ -1,9 +1,11 @@
from django.apps import AppConfig
from django.utils.translation import gettext_lazy as _
class EveAutogroupsConfig(AppConfig):
name = 'allianceauth.eveonline.autogroups'
label = 'eve_autogroups'
verbose_name = _('EVE Online Autogroups')
def ready(self):
import allianceauth.eveonline.autogroups.signals

View File

@ -1,4 +1,5 @@
import logging
from typing import ClassVar
from django.db import models, transaction
from django.contrib.auth.models import Group, User
from django.core.exceptions import ObjectDoesNotExist
@ -78,7 +79,7 @@ class AutogroupsConfig(models.Model):
max_length=10, default='', blank=True,
help_text='Any spaces in the group name will be replaced with this.')
objects = AutogroupsConfigManager()
objects: ClassVar[AutogroupsConfigManager] = AutogroupsConfigManager()
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)

View File

@ -14,10 +14,10 @@ class EveCharacterProviderManager:
class EveCharacterManager(models.Manager):
provider = EveCharacterProviderManager()
def create_character(self, character_id):
def create_character(self, character_id) -> models.Model:
return self.create_character_obj(self.provider.get_character(character_id))
def create_character_obj(self, character: providers.Character):
def create_character_obj(self, character: providers.Character) -> models.Model:
return self.create(
character_id=character.id,
character_name=character.name,

View File

@ -1,5 +1,5 @@
import logging
from typing import Union
from typing import ClassVar, Union
from django.core.exceptions import ObjectDoesNotExist
from django.db import models
@ -75,8 +75,8 @@ class EveAllianceInfo(models.Model):
alliance_ticker = models.CharField(max_length=254)
executor_corp_id = models.PositiveIntegerField()
objects = EveAllianceManager()
provider = EveAllianceProviderManager()
objects: ClassVar[EveAllianceManager] = EveAllianceManager()
provider: ClassVar[EveAllianceProviderManager] = EveAllianceProviderManager()
class Meta:
indexes = [models.Index(fields=['executor_corp_id',])]
@ -147,7 +147,7 @@ class EveCorporationInfo(models.Model):
EveAllianceInfo, blank=True, null=True, on_delete=models.SET_NULL
)
objects = EveCorporationManager()
objects: ClassVar[EveCorporationManager] = EveCorporationManager()
provider = EveCorporationProviderManager()
class Meta:
@ -214,7 +214,7 @@ class EveCharacter(models.Model):
faction_id = models.PositiveIntegerField(blank=True, null=True, default=None)
faction_name = models.CharField(max_length=254, blank=True, null=True, default='')
objects = EveCharacterManager()
objects: ClassVar[EveCharacterManager] = EveCharacterManager()
provider = EveCharacterProviderManager()
class Meta:

View File

@ -1,6 +1,8 @@
from django.apps import AppConfig
from django.utils.translation import gettext_lazy as _
class FatConfig(AppConfig):
name = 'allianceauth.fleetactivitytracking'
label = 'fleetactivitytracking'
verbose_name = _('Fleet Activity Tracking')

View File

@ -36,7 +36,7 @@
<th class="text-center">{% translate "Character" %}</th>
<th class="text-center">{% translate "System" %}</th>
<th class="text-center">{% translate "Ship" %}</th>
<th class="text-center">{% translate "Eve Time" %}</th>
<th class="text-center">{% translate "EVE time" %}</th>
<th></th>
</tr>

View File

@ -72,7 +72,7 @@
<tr>
<th class="text-center">{% translate "Fleet" %}</th>
<th class="text-center">{% translate "Creator" %}</th>
<th class="text-center">{% translate "Eve Time" %}</th>
<th class="text-center">{% translate "EVE time" %}</th>
<th class="text-center">{% translate "Duration" %}</th>
<th class="text-center">{% translate "Edit" %}</th>
</tr>

View File

@ -41,7 +41,7 @@
<th scope="col" class="text-center">{% translate "Character" %}</th>
<th scope="col" class="text-center">{% translate "System" %}</th>
<th scope="col" class="text-center">{% translate "Ship" %}</th>
<th scope="col" class="text-center">{% translate "Eve Time" %}</th>
<th scope="col" class="text-center">{% translate "EVE time" %}</th>
</tr>
{% for fat in fats %}
@ -89,7 +89,7 @@
<th scope="col" class="text-center">{% translate "Name" %}</th>
<th scope="col" class="text-center">{% translate "Creator" %}</th>
<th scope="col" class="text-center">{% translate "Fleet" %}</th>
<th scope="col" class="text-center">{% translate "Eve Time" %}</th>
<th scope="col" class="text-center">{% translate "EVE time" %}</th>
<th scope="col" class="text-center">{% translate "Duration" %}</th>
<th scope="col" class="text-center">{% translate "Edit" %}</th>
</tr>

View File

@ -3,6 +3,7 @@ Framework App Config
"""
from django.apps import AppConfig
from django.utils.translation import gettext_lazy as _
class FrameworkConfig(AppConfig):
@ -12,3 +13,4 @@ class FrameworkConfig(AppConfig):
name = "allianceauth.framework"
label = "framework"
verbose_name = _("Framework")

View File

@ -5,6 +5,24 @@
* to be used throughout Alliance Auth and its Community Apps
*/
/* General
------------------------------------------------------------------------------------- */
@media all {
.navbar-toggler.collapsed {
transform: rotate(180deg);
}
ul#nav-right:has(li) + ul#nav-right-character-control > li:first-child {
display: list-item !important;
}
}
@media all and (max-width: 991px) {
ul#nav-left:has(li) + ul#nav-right + ul#nav-right-character-control > li:first-child {
display: list-item !important;
}
}
/* Bootstrap fixes
------------------------------------------------------------------------------------- */
@media all {

View File

@ -2,12 +2,14 @@
{# {% include "framework/header/page-header.html" with title="Foobar" subtitle="Barfoo" %}#}
{% if title %}
<h1 class="page-header text-center mb-3">
{{ title }}
<header class="aa-page-header mb-3">
<h1 class="page-header text-center">
{{ title }}
{% if subtitle %}
<br>
<small class="text-muted">{{ subtitle }}</small>
{% endif %}
</h1>
{% if subtitle %}
<br>
<small class="text-muted">{{ subtitle }}</small>
{% endif %}
</h1>
</header>
{% endif %}

View File

@ -1,10 +1,11 @@
from django.apps import AppConfig
from django.utils.translation import gettext_lazy as _
class GroupManagementConfig(AppConfig):
name = 'allianceauth.groupmanagement'
label = 'groupmanagement'
verbose_name = 'Group Management'
verbose_name = _('Group Management')
def ready(self):
from . import signals # noqa: F401

View File

@ -1,6 +1,8 @@
from django.apps import AppConfig
from django.utils.translation import gettext_lazy as _
class HRApplicationsConfig(AppConfig):
name = 'allianceauth.hrapplications'
label = 'hrapplications'
verbose_name = _('HR Applications')

View File

@ -1,3 +1,4 @@
from typing import ClassVar
from django.contrib.auth.models import User
from django.db import models
from sortedm2m.fields import SortedManyToManyField
@ -40,7 +41,7 @@ class Application(models.Model):
reviewer_character = models.ForeignKey(EveCharacter, on_delete=models.SET_NULL, blank=True, null=True)
created = models.DateTimeField(auto_now_add=True)
objects = ApplicationManager()
objects: ClassVar[ApplicationManager] = ApplicationManager()
def __str__(self):
return str(self.user) + " Application To " + str(self.form)

View File

@ -1,6 +1,7 @@
import logging
from django.apps import AppConfig
from django.utils.translation import gettext_lazy as _
logger = logging.getLogger(__name__)
@ -12,6 +13,7 @@ logger = logging.getLogger(__name__)
class MenuConfig(AppConfig):
name = "allianceauth.menu"
label = "menu"
verbose_name = _("Menu")
def ready(self):
from allianceauth.menu.core import smart_sync

View File

@ -1,3 +1,4 @@
from typing import ClassVar
from django.db import models
from django.utils.translation import gettext_lazy as _
@ -68,7 +69,7 @@ class MenuItem(models.Model):
help_text=_("External URL this menu items will link to"),
)
objects = MenuItemManager()
objects: ClassVar[MenuItemManager] = MenuItemManager()
def __str__(self) -> str:
return self.text

View File

@ -1,6 +1,8 @@
from django.apps import AppConfig
from django.utils.translation import gettext_lazy as _
class NotificationsConfig(AppConfig):
name = 'allianceauth.notifications'
label = 'notifications'
verbose_name = _('Notifications')

View File

@ -1,4 +1,5 @@
import logging
from typing import ClassVar
from django.db import models
from django.contrib.auth.models import User
@ -56,7 +57,7 @@ class Notification(models.Model):
timestamp = models.DateTimeField(auto_now_add=True, db_index=True)
viewed = models.BooleanField(default=False, db_index=True)
objects = NotificationManager()
objects: ClassVar[NotificationManager] = NotificationManager()
def __str__(self) -> str:
return f"{self.user}: {self.title}"

View File

@ -1,6 +1,8 @@
from django.apps import AppConfig
from django.utils.translation import gettext_lazy as _
class OptimerConfig(AppConfig):
name = 'allianceauth.optimer'
label = 'optimer'
verbose_name = _('Fleet Operations')

View File

@ -14,7 +14,7 @@
<th class="text-center">{% translate "Operation" %}</th>
<th class="text-center">{% translate "Type" %}</th>
<th class="text-center">{% translate "Form Up System" %}</th>
<th class="text-center">{% translate "EVE Time" %}</th>
<th class="text-center">{% translate "EVE time" %}</th>
</tr>
</thead>

View File

@ -25,7 +25,7 @@
<div>
<div class="text-center mb-3">
<div class="badge bg-primary text-start">
<b>{% translate "Current Eve Time:" %}</b>
<b>{% translate "Current EVE time:" %}</b>
<span id="current-time"></span>
</div>
</div>
@ -127,8 +127,8 @@
};
/**
* Get the current Eve time as a string
* @returns {string} Eve time string
* Get the current EVE time as a string
* @returns {string} EVE time string
*/
const updateClock = () => {
document.getElementById("current-time").innerHTML = getCurrentEveTimeString();

View File

@ -1,6 +1,8 @@
from django.apps import AppConfig
from django.utils.translation import gettext_lazy as _
class PermissionsToolConfig(AppConfig):
name = 'allianceauth.permissions_tool'
label = 'permissions_tool'
verbose_name = _('Permissions Audit')

View File

@ -61,6 +61,7 @@ CELERYBEAT_SCHEDULE = {
'esi_cleanup_token': {
'task': 'esi.tasks.cleanup_token',
'schedule': crontab(minute='0', hour='0'),
'apply_offset': True,
},
'run_model_update': {
'task': 'allianceauth.eveonline.tasks.run_model_update',

View File

@ -1,49 +1,48 @@
[program:beat]
command={{ celery }} -A {{ project_name }} beat
directory={{ project_directory }}
user=allianceserver
stdout_logfile={{ project_directory }}/log/beat.log
stderr_logfile={{ project_directory }}/log/beat.log
autostart=true
autorestart=true
startsecs=10
priority=998
command = {{ celery }} -A {{ project_name }} beat
directory = {{ project_directory }}
user = allianceserver
stdout_logfile = {{ project_directory }}/log/%(program_name)s.log
stderr_logfile = {{ project_directory }}/log/%(program_name)s.log
autostart = true
autorestart = true
startsecs = 10
priority = 998
[program:worker]
command={{ celery }} -A {{ project_name }} worker --pool=threads --concurrency=5 -n %(program_name)s_%(process_num)02d
directory={{ project_directory }}
user=allianceserver
numprocs=1
process_name=%(program_name)s_%(process_num)02d
stdout_logfile={{ project_directory }}/log/worker.log
stderr_logfile={{ project_directory }}/log/worker.log
autostart=true
autorestart=true
startsecs=10
command = {{ celery }} -A {{ project_name }} worker --pool=threads --concurrency=5 -n %(program_name)s_%(process_num)02d
directory = {{ project_directory }}
user = allianceserver
numprocs = 1
process_name = %(program_name)s_%(process_num)02d
stdout_logfile = {{ project_directory }}/log/%(program_name)s.log
stderr_logfile = {{ project_directory }}/log/%(program_name)s.log
autostart = true
autorestart = true
startsecs = 10
stopwaitsecs = 600
killasgroup=true
priority=998
killasgroup = true
priority = 998
{% if gunicorn %}
[program:gunicorn]
user = allianceserver
directory={{ project_directory }}
command={{ gunicorn }} {{ project_name }}.wsgi --workers=3 --timeout 120
stdout_logfile={{ project_directory }}/log/gunicorn.log
stderr_logfile={{ project_directory }}/log/gunicorn.log
autostart=true
autorestart=true
stopsignal=INT
directory = {{ project_directory }}
command = {{ gunicorn }} {{ project_name }}.wsgi --workers=3 --timeout 120
stdout_logfile = {{ project_directory }}/log/%(program_name)s.log
stderr_logfile = {{ project_directory }}/log/%(program_name)s.log
autostart = true
autorestart = true
stopsignal = INT
{% endif %}
[eventlistener:memmon]
command={{ memmon }} -p worker_00=256MB -p gunicorn=256MB
directory={{ project_directory }}
events=TICK_60
stdout_logfile={{ project_directory }}/log/memmon.log
stderr_logfile={{ project_directory }}/log/memmon.log
command = {{ memmon }} -p worker_00=256MB -p gunicorn=256MB
directory = {{ project_directory }}
events = TICK_60
stdout_logfile = {{ project_directory }}/log/memmon.log
stderr_logfile = {{ project_directory }}/log/memmon.log
[group:{{ project_name }}]
programs=beat,worker{% if gunicorn %},gunicorn{% endif %}
priority=999
programs = beat,worker{% if gunicorn %},gunicorn{% endif %}
priority = 999

View File

@ -1,9 +1,11 @@
from django.apps import AppConfig
from django.utils.translation import gettext_lazy as _
class ServicesConfig(AppConfig):
name = 'allianceauth.services'
label = 'services'
verbose_name = _('Services')
def ready(self):
from . import signals

View File

@ -1,6 +1,8 @@
from django.apps import AppConfig
from django.utils.translation import gettext_lazy as _
class DiscordServiceConfig(AppConfig):
name = 'allianceauth.services.modules.discord'
label = 'discord'
verbose_name = _('Discord Service')

View File

@ -1,5 +1,5 @@
import logging
from typing import Optional
from typing import ClassVar, Optional
from requests.exceptions import HTTPError
@ -59,7 +59,7 @@ class DiscordUser(models.Model):
help_text='Date & time this service account was activated'
)
objects = DiscordUserManager()
objects: ClassVar[DiscordUserManager] = DiscordUserManager()
class Meta:
permissions = (

View File

@ -1,6 +1,8 @@
from django.apps import AppConfig
from django.utils.translation import gettext_lazy as _
class DiscourseServiceConfig(AppConfig):
name = 'allianceauth.services.modules.discourse'
label = 'discourse'
verbose_name = _('Discourse Service')

View File

@ -1,6 +1,8 @@
from django.apps import AppConfig
from django.utils.translation import gettext_lazy as _
class ExampleServiceConfig(AppConfig):
name = 'allianceauth.services.modules.example'
label = 'example_service'
verbose_name = _('Example Service')

View File

@ -1,6 +1,8 @@
from django.apps import AppConfig
from django.utils.translation import gettext_lazy as _
class Ips4ServiceConfig(AppConfig):
name = 'allianceauth.services.modules.ips4'
label = 'ips4'
verbose_name = _('IPS4 Service')

View File

@ -1,6 +1,8 @@
from django.apps import AppConfig
from django.utils.translation import gettext_lazy as _
class MumbleServiceConfig(AppConfig):
name = 'allianceauth.services.modules.mumble'
label = 'mumble'
verbose_name = _('Mumble Service')

View File

@ -1,5 +1,6 @@
import random
import string
from typing import ClassVar
from passlib.hash import bcrypt_sha256
from django.db import models
@ -116,7 +117,7 @@ class MumbleUser(AbstractServiceModel):
help_text="Timestamp of the users Last Disconnection to Mumble"
)
objects = MumbleManager()
objects: ClassVar[MumbleManager] = MumbleManager()
def __str__(self):
return self.username

View File

@ -48,9 +48,9 @@
</a>
{% 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 %}
{% if perms.mumble.view_connection_history %}
<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 %}

View File

@ -1,6 +1,8 @@
from django.apps import AppConfig
from django.utils.translation import gettext_lazy as _
class OpenfireServiceConfig(AppConfig):
name = 'allianceauth.services.modules.openfire'
label = 'openfire'
verbose_name = _('Openfire Service')

View File

@ -1,6 +1,8 @@
from django.apps import AppConfig
from django.utils.translation import gettext_lazy as _
class Phpbb3ServiceConfig(AppConfig):
name = 'allianceauth.services.modules.phpbb3'
label = 'phpbb3'
verbose_name = _('phpBB3 Service')

View File

@ -1,6 +1,8 @@
from django.apps import AppConfig
from django.utils.translation import gettext_lazy as _
class SmfServiceConfig(AppConfig):
name = 'allianceauth.services.modules.smf'
label = 'smf'
verbose_name = _('SMF Service')

View File

@ -1,9 +1,11 @@
from django.apps import AppConfig
from django.utils.translation import gettext_lazy as _
class Teamspeak3ServiceConfig(AppConfig):
name = 'allianceauth.services.modules.teamspeak3'
label = 'teamspeak3'
verbose_name = _('TeamSpeak 3 Service')
def ready(self):
from . import signals

View File

@ -1,6 +1,8 @@
from django.apps import AppConfig
from django.utils.translation import gettext_lazy as _
class XenforoServiceConfig(AppConfig):
name = 'allianceauth.services.modules.xenforo'
label = 'xenforo'
verbose_name = _('Xenforo Service')

View File

@ -1,6 +1,6 @@
{% load i18n %}
<div class="card text-center m-2" style="min-width: 18rem; min-height: 18rem;">
<div class="card text-center mx-2 mb-3" style="min-width: 18rem; min-height: 18rem;">
<div class="card-body">
<h5 class="card-title">{% block title %}{% endblock title %}</h5>

View File

@ -1,6 +1,8 @@
from django.apps import AppConfig
from django.utils.translation import gettext_lazy as _
class SRPConfig(AppConfig):
name = 'allianceauth.srp'
label = 'srp'
verbose_name = _('Ship Replacement')

View File

@ -172,7 +172,7 @@ ul.list-group.list-group-horizontal > li.list-group-item {
}
}
/* eve time in navbar
/* EVE time in navbar
------------------------------------------------------------------------------------- */
@media all {
.nav-item-eve-time .eve-time-wrapper {

View File

@ -14,7 +14,7 @@ $(document).ready(() => {
};
/**
* Start the Eve time clock in the top menu bar
* Start the EVE time clock in the top menu bar
*/
setInterval(() => {
renderClock($('.eve-time-wrapper .eve-time-clock'));

View File

@ -28,7 +28,7 @@ const getDurationString = (duration) => { // eslint-disable-line no-unused-vars
};
/**
* returns the current eve time as a formatted string
* returns the current EVE time as a formatted string
*
* condition:
* only if moment.js is loaded before,

View File

@ -12,11 +12,7 @@
<ul class="list-group">
{% for notif in notifications %}
<li class="list-group-item">
{% if notif.state == 'opened' %}
<span class="badge bg-success me-2">{% translate "Open" %}</span>
{% else %}
<span class="badge bg-danger me-2">{% translate "Closed" %}</span>
{% endif %}
<span class="badge bg-success me-2">{% translate "Open" %}</span>
<a href="{{ notif.web_url }}" target="_blank">#{{ notif.iid }} {{ notif.title }}</a>
</li>
{% empty %}

View File

@ -12,11 +12,10 @@
<!-- End Required meta tags -->
<!-- Meta tags -->
<!-- TODO Bundle all the site specific stuff up into its own template for easy override -->
<meta name="description" content="">
<meta name="author" content="">
{% include 'allianceauth/opengraph.html' %}
{% include 'allianceauth/icons.html' %}
<!-- Meta tags -->
<title>{% block title %}{% block page_title %}{% endblock page_title %} - {{ SITE_NAME }}{% endblock title %}</title>
{% theme_css %}
@ -25,12 +24,11 @@
{% include 'bundles/auth-framework-css.html' %}
<style>
.navbar-toggler.collapsed{
transform: rotate(180deg);
}
.nav-padding {
padding-top: {% header_padding_size %} !important;
@media all {
.nav-padding {
margin-top: {% header_padding_size %} !important;
max-height: calc(100vh - {% header_padding_size %}) !important;
}
}
</style>
@ -63,6 +61,11 @@
</ul>
<ul id="nav-right-character-control" class="nav navbar-nav">
<li class="nav-item ms-lg-2 py-2 py-lg-1 col-12 col-lg-auto d-none">
<div class="vr d-none d-lg-flex h-100 mx-2 text-white-50"></div>
<hr class="d-lg-none my-2 text-body text-white-50">
</li>
{% block header_nav_user_character_control %} <!-- Default to add char and swap main -->
{% include 'allianceauth/top-menu-rh-default.html' %}
{% endblock %}

View File

@ -0,0 +1,8 @@
{% load static %}
<meta property="og:title" content="{{ SITE_NAME }}">
<meta property="og:image" content="{{ SITE_URL }}{% static 'allianceauth/icons/apple-touch-icon.png' %}">
<meta property="og:description" content="Alliance Auth - An auth system for EVE Online to help in-game organizations manage online service access.">
<meta property="og:type" content="website">
<meta property="og:site_name" content="{{ request.META.HTTP_HOST }}">
<meta property="og:url" content="{{ request.path }}">

View File

@ -20,7 +20,7 @@
<div class="collapse navbar-collapse auth-menus-collapse">
<ul class="nav navbar-nav navbar-right navbar-pills">
<li class="nav-item-eve-time">
<div class="eve-time-wrapper">{% translate "Eve Time" %}: <span class="eve-time-clock"></span></div>
<div class="eve-time-wrapper">{% translate "EVE time" %}: <span class="eve-time-clock"></span></div>
</li>
{% if user.is_authenticated %}

View File

@ -1,3 +1,3 @@
{% load static %}
<img src="{% static 'allianceauth/images/auth-logo.svg' %}" width="{{ logo_width|default:"128px" }}" height="{% if logo_height %}{{ logo_ }}{% else %}{{ logo_width|default:"128px" }}{% endif %}" alt="{{ SITE_NAME }}">
<img src="{% static 'allianceauth/images/auth-logo.svg' %}" width="{{ logo_width|default:"128px" }}" height="{% if logo_height %}{{ logo_height }}{% else %}{{ logo_width|default:"128px" }}{% endif %}" alt="{{ SITE_NAME }}">

View File

@ -67,6 +67,26 @@ def get_datatables_language_static(language: str) -> str:
return static_url
@register.simple_tag
def get_relative_datatables_language_path(language: str) -> str:
"""
Get the correct language code URL for DataTables (relative path to the static folder)
:param language: Django's language code
:type language: str
:return: Mapped language code
:rtype: str
"""
mapped_language = get_datatable_language_code(language)
static_url = (
f"allianceauth/libs/DataTables/Plugins/2.2.1/i18n/{mapped_language}.json"
if mapped_language
else ""
)
return static_url
@register.simple_tag
def get_momentjs_language_static(language: str) -> str:
@ -88,3 +108,24 @@ def get_momentjs_language_static(language: str) -> str:
)
return static_url
@register.simple_tag
def get_relative_momentjs_language_path(language: str) -> str:
"""
Get the correct language code URL for Moment.JS (relative path to the static folder)
:param language: Django's language code
:type language: str
:return: Mapped language code path
:rtype: str
"""
mapped_language = get_momentjs_language_code(language)
static_url = (
f"allianceauth/libs/moment.js/2.29.4/locale/{mapped_language}.js"
if mapped_language
else ""
)
return static_url

View File

@ -1,6 +1,8 @@
from django.apps import AppConfig
from django.utils.translation import gettext_lazy as _
class TimerBoardConfig(AppConfig):
name = 'allianceauth.timerboard'
label = 'timerboard'
verbose_name = _('Structure Timers')

View File

@ -66,7 +66,7 @@ class TimerForm(forms.ModelForm):
future_time = datetime.timedelta(days=days_left, hours=hours_left, minutes=minutes_left)
current_time = timezone.now()
eve_time = current_time + future_time
logger.debug(f"Determined timer eve time is {eve_time} - current time {current_time}, adding {future_time}")
logger.debug(f"Determined timer EVE time is {eve_time} - current time {current_time}, adding {future_time}")
elif absolute_time:
# Use absolute time
eve_time = absolute_time

View File

@ -0,0 +1,18 @@
# Generated by Django 4.2.16 on 2025-03-26 20:53
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('timerboard', '0007_alter_timer_structure'),
]
operations = [
migrations.AlterField(
model_name='timer',
name='timer_type',
field=models.CharField(choices=[('UNSPECIFIED', 'Not Specified'), ('SHIELD', 'Shield'), ('ARMOR', 'Armor'), ('HULL', 'Hull'), ('FINAL', 'Final'), ('ANCHORING', 'Anchoring'), ('UNANCHORING', 'Unanchoring'), ('ABANDONED', 'Abandoned'), ('THEFT', 'Theft')], default='UNSPECIFIED', max_length=254),
),
]

View File

@ -57,6 +57,7 @@ class Timer(models.Model):
ANCHORING = "ANCHORING", _("Anchoring")
UNANCHORING = "UNANCHORING", _("Unanchoring")
ABANDONED = "ABANDONED", _("Abandoned")
THEFT = "THEFT", _("Theft")
details = models.CharField(max_length=254, default="")
system = models.CharField(max_length=254, default="")

View File

@ -15,7 +15,7 @@
<th class="text-center">{% translate "Timer" %}</th>
<th class="text-center">{% translate "Type" %}</th>
<th class="text-center">{% translate "System" %}</th>
<th class="text-center">{% translate "EVE Time" %}</th>
<th class="text-center">{% translate "EVE time" %}</th>
</tr>
</thead>

View File

@ -9,7 +9,7 @@
<th class="text-center">{% translate "Objective" %}</th>
<th class="text-center">{% translate "System" %}</th>
<th class="text-center">{% translate "Structure" %}</th>
<th class="text-center">{% translate "Eve Time" %}</th>
<th class="text-center">{% translate "EVE time" %}</th>
<th class="text-center">{% translate "Local Time" %}</th>
<th class="text-center">{% translate "Creator" %}</th>

View File

@ -29,7 +29,7 @@
<div class="allianceauth-timerboard">
<div class="col-lg-12 text-center mb-3">
<div class="badge bg-primary text-start">
<span>{% translate "Current Eve Time:" %}</span>
<span>{% translate "Current EVE time:" %}</span>
<span id="current-time"></span>
</div>
</div>

View File

@ -81,7 +81,7 @@ Example implementation for a celery chain:
```python
from allianceauth.services.hooks import get_extension_logger
from celery import shared_task, chain
from celery import shared_task, group
logger = get_extension_logger(__name__)
@ -98,18 +98,23 @@ def long_runner():
task_signature = example.si()
my_tasks.append(task_signature)
chain(my_tasks).delay()
group(my_tasks).delay()
```
In this example, we first add 10 example tasks that need to run one after the other to a list. This can be done by creating a so-called signature for a task. Those signatures are a kind of wrapper for tasks and can be used in various ways to compose work flow for tasks.
The list of task signatures is then converted to a chain and started asynchronously.
:::{note}
In this example we import group to execute all tasks independently.
If you wish to run them in order (and stop if a tasks fail) you can use `celery.chain` instead of `celery.group`
For more information on signature and work flows see the official documentation on [Canvas](https://docs.celeryproject.org/en/latest/userguide/canvas.html).
:::
:::{hint}
In our example we use ``si()``, which is a shortcut for "immutable signatures" and prevents us from having to deal with result sharing between tasks.
For more information on signature and work flows see the official documentation on `Canvas <https://docs.celeryproject.org/en/latest/userguide/canvas.html>`_.
In this context, please note that Alliance Auth currently only supports chaining because all other variants require a so-called results back, which Alliance Auth does not have.
:::