Compare commits

...

7 Commits

Author SHA1 Message Date
Aaron Kable
10c7fa6fdb Merge branch 'group-manager' into 'master'
[Feature] Group Management - Async Join/Leave and Datatables

See merge request allianceauth/allianceauth!1784
2025-12-21 07:30:38 +00:00
Aaron Kable
0c0f2fd5ba minor fixes 2025-12-21 15:30:26 +08:00
Aaron Kable
b32f4ab243 Async Join/Leave, and Datatables 2025-12-21 15:21:27 +08:00
Ariel Rin
70f314e578 Merge branch 'development-team' into 'master'
[CHANGE] Update development team

See merge request allianceauth/allianceauth!1782
2025-12-10 08:57:02 +00:00
Peter Pfeufer
bc1b1c3a8f [CHANGE] Update development team 2025-12-10 09:40:47 +01:00
Joel Falknau
f5ddbb8004 version Bump 4.11.2 2025-11-13 11:48:01 +10:00
Joel Falknau
c45d5d7325 Allow the older ua generator to still pass on old python 2025-11-13 11:35:17 +10:00
6 changed files with 175 additions and 18 deletions

View File

@@ -63,7 +63,6 @@ Here is an example of the Alliance Auth web site with a mixture of Services, App
- [Aaron Kable](https://gitlab.com/aaronkable/)
- [Ariel Rin](https://gitlab.com/soratidus999/)
- [Col Crunch](https://gitlab.com/colcrunch/)
- [Erik Kalkoken](https://gitlab.com/ErikKalkoken/)
- [Rounon Dax](https://gitlab.com/ppfeufer)
- [snipereagle1](https://gitlab.com/mckernanin)
@@ -71,6 +70,7 @@ Here is an example of the Alliance Auth web site with a mixture of Services, App
- [Adarnof](https://gitlab.com/adarnof/)
- [Basraah](https://gitlab.com/basraah/)
- [Erik Kalkoken](https://gitlab.com/ErikKalkoken/)
### Beta Testers / Bug Fixers

View File

@@ -5,7 +5,7 @@ manage online service access.
# This will make sure the app is always imported when
# Django starts so that shared_task will use this app.
__version__ = '4.11.1'
__version__ = '4.11.2'
__title__ = 'Alliance Auth'
__title_useragent__ = 'AllianceAuth'
__url__ = 'https://gitlab.com/allianceauth/allianceauth'

View File

@@ -727,7 +727,8 @@ class TestEveSwaggerProvider(TestCase):
my_provider = EveSwaggerProvider()
my_client = my_provider.client
operation = my_client.Universe.get_universe_factions()
self.assertEqual(
operation.future.request.headers['User-Agent'],
f'AllianceAuth/{aa_version} (dummy@example.net; +{aa_url}) Django-ESI/{esi_version} (+{esi_url})'
)
expected_variants = {
f'AllianceAuth/{aa_version} (dummy@example.net; +{aa_url}) DjangoEsi/{esi_version} (+{esi_url})', # Django-ESI 8.0.0
f'AllianceAuth/{aa_version} (dummy@example.net; +{aa_url}) Django-ESI/{esi_version} (+{esi_url})' # Django-ESI 7.x, Py38 Py39
}
self.assertIn(operation.future.request.headers['User-Agent'], expected_variants)

View File

@@ -43,19 +43,19 @@
</li>
{% endblock header_nav_collapse_left %}
{% block content %}
<div class="tab-content">
<div id="add" class="tab-pane active">
{% if acceptrequests %}
<div class="table-responsive">
<table class="table">
<div>
<table id="table-add" class="table table-responsive">
<thead>
<tr>
<th>{% translate "Character" %}</th>
<th>{% translate "Organization" %}</th>
<th>{% translate "Group" %}</th>
<th></th>
<th>{% translate "Corporation" %}</th>
</tr>
</thead>
@@ -89,13 +89,24 @@
<td>{{ acceptrequest.group.name }}</td>
<td class="text-end">
<a href="{% url 'groupmanagement:accept_request' acceptrequest.id %}" class="btn btn-success">
<div class="spinner-border spinner-border-sm mt-2 btns-join-{{acceptrequest.id}} d-none" role="status">
<span class="sr-only">Loading...</span>
</div>
<a id="{{acceptrequest.id}}" class="btn btn-success join-accept btns-join-{{acceptrequest.id}}">
{% translate "Accept" %}
</a>
<a href="{% url 'groupmanagement:reject_request' acceptrequest.id %}" class="btn btn-danger">
<a id="{{acceptrequest.id}}" class="btn btn-danger join-reject btns-join-{{acceptrequest.id}}">
{% translate "Reject" %}
</a>
</td>
<td>
{% if acceptrequest.main_char %}
{{ acceptrequest.main_char.corporation_name }}
{% else %}
{% translate "(unknown)" %}
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
@@ -111,14 +122,15 @@
{% if not show_leave_tab %}
<div id="leave" class="tab-pane">
{% if leaverequests %}
<div class="table-responsive">
<table class="table">
<div>
<table id="table-rem" class="table table-responsive">
<thead>
<tr>
<th>{% translate "Character" %}</th>
<th>{% translate "Organization" %}</th>
<th>{% translate "Group" %}</th>
<th></th>
<th>{% translate "Corporation" %}</th>
</tr>
</thead>
@@ -152,14 +164,23 @@
<td>{{ leaverequest.group.name }}</td>
<td class="text-end">
<a href="{% url 'groupmanagement:leave_accept_request' leaverequest.id %}" class="btn btn-success">
<div class="spinner-border spinner-border-sm mt-2 btns-leave-{{leaverequest.id}} d-none" role="status">
<span class="sr-only">Loading...</span>
</div>
<a id="{{leaverequest.id}}" class="btn btn-success accept leave-accept btns-leave-{{leaverequest.id}}">
{% translate "Accept" %}
</a>
<a href="{% url 'groupmanagement:leave_reject_request' leaverequest.id %}" class="btn btn-danger">
<a id="{{leaverequest.id}}" class="btn btn-danger reject leave-reject btns-leave-{{leaverequest.id}}">
{% translate "Reject" %}
</a>
</td>
<td>
{% if leaverequest.main_char %}
{{ leaverequest.main_char.corporation_name }}
{% else %}
{% translate "(unknown)" %}
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
@@ -172,3 +193,138 @@
{% endif %}
</div>
{% endblock content %}
{% block extra_javascript %}
{% include 'bundles/datatables-js-bs5.html' %}
{% include "bundles/filterdropdown-js.html" %}
<script>
$(document).ready(function () {
let tableAdd = $("#table-add").DataTable({
filterDropDown: {
columns: [
{
idx: 4,
},
{
idx: 2,
}
],
bootstrap: true,
bootstrap_version: 5
},
columnDefs: [
{
target: 4,
visible: false,
},
],
paging: false,
responsive: true,
pageLength: -1
});
let tableRem = $("#table-rem").DataTable({
filterDropDown: {
columns: [
{
idx: 4,
},
{
idx: 2,
}
],
bootstrap: true,
bootstrap_version: 5
},
columnDefs: [
{
target: 4,
visible: false,
},
],
paging: false,
responsive: true,
pageLength: -1
});
// URL's for fetch requests
let acceptJoinURL = "{% url 'groupmanagement:accept_request' 0 %}";
acceptJoinURL = acceptJoinURL.substring(0, acceptJoinURL.length-2);
let rejectJoinURL = "{% url 'groupmanagement:reject_request' 0 %}";
rejectJoinURL = rejectJoinURL.substring(0, rejectJoinURL.length-2);
let acceptLeaveURL = "{% url 'groupmanagement:leave_accept_request' 0 %}";
acceptLeaveURL = acceptLeaveURL.substring(0, acceptLeaveURL.length-2);
let rejectLeaveURL = "{% url 'groupmanagement:leave_reject_request' 0 %}";
rejectLeaveURL = rejectLeaveURL.substring(0, rejectLeaveURL.length-2);
function removeRow(table, classLookup){
let btn = $(classLookup);
table.row($(btn[0]).parents('tr')).remove().draw();
}
function toggleButtons(classLookup){
let elems = document.querySelectorAll(classLookup);
elems.forEach(
function(e) {
e.classList.toggle('d-none');
}
);
}
function hitAuth(classLookup, table, URL){
toggleButtons(classLookup);
fetch(URL)
.then(response => {
if (!response.ok) {
toggleButtons(classLookup);
return
}
removeRow(table, classLookup)
})
.catch(error => {
toggleButtons(classLookup);
return;
});
toggleButtons(classLookup);
}
let acceptJoinButtons = document.querySelectorAll(".join-accept");
acceptJoinButtons.forEach(function(elem) {
elem.addEventListener("click", function(event) {
url = `${acceptJoinURL}${event.target.id}/`
let elemClass = `.btns-join-${event.target.id}`
hitAuth(elemClass, tableAdd, url)
});
});
let rejectJoinButtons = document.querySelectorAll(".join-reject");
rejectJoinButtons.forEach(function(elem) {
elem.addEventListener("click", function(event) {
url = `${rejectJoinURL}${event.target.id}/`
let elemClass = `.btns-join-${event.target.id}`
hitAuth(elemClass, tableAdd, url)
});
});
let acceptLeaveButtons = document.querySelectorAll(".leave-accept");
acceptLeaveButtons.forEach(function(elem) {
elem.addEventListener("click", function(event) {
url = `${acceptLeaveURL}${event.target.id}/`
let elemClass = `.btns-leave-${event.target.id}`
hitAuth(elemClass, tableRem, url)
});
});
let rejectLeaveButtons = document.querySelectorAll(".leave-reject");
rejectLeaveButtons.forEach(function(elem) {
elem.addEventListener("click", function(event) {
url = `${rejectLeaveURL}${event.target.id}/`
let elemClass = `.btns-leave-${event.target.id}`
hitAuth(elemClass, tableRem, url)
});
});
});
</script>
{% endblock extra_javascript %}
{% block extra_css %}
{% include 'bundles/datatables-css-bs5.html' %}
{% endblock %}

View File

@@ -1,7 +1,7 @@
PROTOCOL=https://
AUTH_SUBDOMAIN=%AUTH_SUBDOMAIN%
DOMAIN=%DOMAIN%
AA_DOCKER_TAG=registry.gitlab.com/allianceauth/allianceauth/auth:v4.11.1
AA_DOCKER_TAG=registry.gitlab.com/allianceauth/allianceauth/auth:v4.11.2
# Nginx Proxy Manager
PROXY_HTTP_PORT=80

View File

@@ -1,5 +1,5 @@
FROM python:3.11-slim
ARG AUTH_VERSION=v4.11.1
ARG AUTH_VERSION=v4.11.2
ARG AUTH_PACKAGE=allianceauth==${AUTH_VERSION}
ENV AUTH_USER=allianceauth
ENV AUTH_GROUP=allianceauth