Compare commits

...

61 Commits

Author SHA1 Message Date
github-actions[bot]
448ab1f2e7 Increment version to v3.3.2 2026-02-17 17:48:17 +00:00
4c1f5951b0 Merge branch 'master' of https://gitea.prod.resk-u.ch/CLERC/Reskreen
All checks were successful
Build and Push Docker Image / build (push) Successful in 4m19s
2026-02-17 18:47:51 +01:00
d0e4e0eec1 Reverse team false 2026-02-17 18:47:31 +01:00
github-actions[bot]
ac6e5e5638 Increment version to v3.3.1 2026-01-14 11:59:22 +00:00
0cd966c316 Merge branch 'master' of https://gitea.prod.resk-u.ch/CLERC/Reskreen
All checks were successful
Build and Push Docker Image / build (push) Successful in 3m2s
2026-01-14 12:58:52 +01:00
26e860f3b9 change minor version +1 2026-01-14 12:58:12 +01:00
github-actions[bot]
57ff385b02 Increment version to v3.2.21 2026-01-14 11:55:48 +00:00
81c3910ff1 Merge branch 'master' of https://gitea.prod.resk-u.ch/CLERC/Reskreen
Some checks failed
Build and Push Docker Image / build (push) Failing after 16s
2026-01-14 12:55:26 +01:00
9f1b1eed7e maj gitea and smaple 2026-01-14 12:55:19 +01:00
github-actions[bot]
cca6c95762 Increment version to v3.2.20 2026-01-14 11:52:14 +00:00
92ce9f948a remove nextcloud and prepare for prod
All checks were successful
Build and Push Docker Image / build (push) Successful in 1m48s
2026-01-14 12:51:49 +01:00
github-actions[bot]
a8e2103eed Increment version to v3.2.19 2026-01-14 11:44:38 +00:00
24d60a8467 Merge branch 'master' of https://gitea.prod.resk-u.ch/CLERC/Reskreen
All checks were successful
Build and Push Docker Image / build (push) Successful in 1m42s
2026-01-14 12:41:49 +01:00
e521fed916 add username to response after login 2026-01-14 12:41:02 +01:00
9e5582a577 add robots.txt 2026-01-14 12:40:49 +01:00
github-actions[bot]
fa54e54ac6 Increment version to v3.2.18 2026-01-09 05:22:48 +00:00
46275fae35 Actualiser docker-compose.yml
All checks were successful
Build and Push Docker Image / build (push) Successful in 1m51s
2026-01-09 05:22:25 +00:00
github-actions[bot]
3935e10a99 Increment version to v3.2.17 2026-01-09 04:51:37 +00:00
adfc921c21 Actualiser docker-compose.yml
All checks were successful
Build and Push Docker Image / build (push) Successful in 1m53s
2026-01-09 04:51:15 +00:00
github-actions[bot]
c336fd9346 Increment version to v3.2.16 2026-01-09 04:25:08 +00:00
c2a6607dec Actualiser config/server_config_default.py
All checks were successful
Build and Push Docker Image / build (push) Successful in 1m59s
2026-01-09 04:21:43 +00:00
github-actions[bot]
a11c8de7c1 Increment version to v3.2.15 2026-01-09 03:59:44 +00:00
98062bc2ea Actualiser docker-compose.yml
All checks were successful
Build and Push Docker Image / build (push) Successful in 2m25s
2026-01-09 03:59:22 +00:00
github-actions[bot]
1874518ea2 Increment version to v3.2.14 2025-11-19 12:50:34 +00:00
2a02d81104 Merge branch 'master' of https://gitea.prod.resk-u.ch/CLERC/Reskreen
All checks were successful
Build and Push Docker Image / build (push) Successful in 1m41s
2025-11-19 12:50:11 +00:00
9956aa9731 Update cron jobs to run every minute and add status monitoring.
- Change runcrons from hourly to every minute
- Add status monitoring via API call
- Update logging for runcrons
- Ensure status API call runs silently
- Maintain same working directory for tasks
2025-11-19 12:50:09 +00:00
github-actions[bot]
a7cbc3aec7 Increment version to v3.2.13 2025-11-19 12:37:52 +00:00
b55a682286 debug
All checks were successful
Build and Push Docker Image / build (push) Successful in 1m42s
2025-11-19 12:37:34 +00:00
github-actions[bot]
02e070f52e Increment version to v3.2.13 2025-11-19 12:33:09 +00:00
6daed93ed5 Merge branch 'master' of https://gitea.prod.resk-u.ch/CLERC/Reskreen
Some checks failed
Build and Push Docker Image / build (push) Failing after 16s
2025-11-19 12:17:20 +00:00
db1649e8e3 Add healthcheck endpoint to Reskreen/urls.py
- Add healthcheck view function
- Create JSON response for healthcheck
- Add URL pattern for healthcheck endpoint
- Keep existing URL patterns intact
- Maintain consistent import style
2025-11-19 12:17:15 +00:00
github-actions[bot]
d8b3510925 Increment version to v3.2.12 2025-09-17 14:21:01 +00:00
243d75f324 Actualiser VERSION
All checks were successful
Build and Push Docker Image / build (push) Successful in 2m43s
2025-09-17 14:20:37 +00:00
github-actions[bot]
8ae2d13648 Increment version to v3.2.10 2025-09-03 13:28:43 +00:00
d89023b17e Merge branch 'master' of https://gitea.prod.resk-u.ch/CLERC/Reskreen
Some checks failed
Build and Push Docker Image / build (push) Failing after 1m2s
2025-09-03 13:28:24 +00:00
dbf5a0cd1c debug 2 2025-09-03 13:28:21 +00:00
github-actions[bot]
296ac3b9d0 Increment version to v3.2.9 2025-09-03 13:27:17 +00:00
7f6c894493 debug
Some checks failed
Build and Push Docker Image / build (push) Has been cancelled
2025-09-03 13:27:01 +00:00
github-actions[bot]
962aec2243 Increment version to v3.2.8 2025-09-03 13:07:53 +00:00
e6972f91a2 accepte manif or Manif
All checks were successful
Build and Push Docker Image / build (push) Successful in 1m53s
2025-09-03 13:07:36 +00:00
github-actions[bot]
3b7f452f3f Increment version to v3.2.7 2025-09-03 10:14:46 +00:00
78e687ff7c Merge branch 'master' of https://gitea.prod.resk-u.ch/CLERC/Reskreen
All checks were successful
Build and Push Docker Image / build (push) Successful in 2m23s
2025-09-03 10:13:57 +00:00
26831ec466 add nOrder to admin:list_display 2025-09-03 10:13:53 +00:00
github-actions[bot]
2ee0e53ab0 Increment version to v3.2.6 2025-08-28 18:10:29 +00:00
a561fd47c2 Add ordering by creation date to vehicle info queries
All checks were successful
Build and Push Docker Image / build (push) Successful in 1m58s
- Sort technique infos by newest first
- Sort matos infos by newest first
- Maintain existing limit for perempt fixes
- Keep existing enabled filter conditions
- Preserve all other serializer functionality
2025-08-28 18:10:11 +00:00
github-actions[bot]
118f4bd42a Increment version to v3.2.5 2025-08-28 17:59:55 +00:00
ec5930099b test
Some checks failed
Build and Push Docker Image / build (push) Failing after 29s
2025-08-28 17:59:36 +00:00
github-actions[bot]
e2cd6bc990 Increment version to v3.2.4 2025-08-28 17:34:18 +00:00
39efdd0dac Merge branch 'master' of https://gitea.prod.resk-u.ch/CLERC/Reskreen
Some checks failed
Build and Push Docker Image / build (push) Failing after 28s
2025-08-28 17:34:02 +00:00
dd97dd291c change version 3.2.3 2025-08-28 17:33:50 +00:00
github-actions[bot]
169460d5c8 Increment version to v3.2.3 2025-08-28 17:31:28 +00:00
949617c18e Update docker-compose.yml: move labels and deploy config to backend service
All checks were successful
Build and Push Docker Image / build (push) Successful in 2m4s
- Move node.labels.reskreen-ready to backend deploy constraints
- Add update_config and restart_policy to backend
- Remove duplicate labels from frontend service
- Keep frontend healthcheck configuration
- Maintain existing logging and network settings
2025-08-28 17:31:04 +00:00
597f134997 Update VehicleInfosViewset to order by dtCreated by default
- Add ordering_fields for dtCreated
- Set default ordering to dtCreated
- Keep existing queryset ordering by -id
- Maintain custom permission class
- Preserve xframe_options_exempt decorator
2025-08-28 17:30:51 +00:00
github-actions[bot]
6d6a4b78e9 Increment version to v3.2.2 2025-06-04 15:20:54 +00:00
008fe7676b Merge branch 'master' of https://gitea.prod.resk-u.ch/CLERC/Reskreen
All checks were successful
Build and Push Docker Image / build (push) Successful in 2m51s
2025-06-04 15:19:53 +00:00
001b108888 change gitea action 2025-06-04 15:19:51 +00:00
github-actions[bot]
49c3cb2364 Increment version to v3.2.1 2025-06-04 15:18:45 +00:00
c7ca904caa change version
Some checks failed
Build and Push Docker Image / build (push) Failing after 44s
2025-06-04 15:18:09 +00:00
github-actions[bot]
7a7765c10b Increment version to v3.2.1 2025-06-04 15:13:59 +00:00
b634a12c6a change version
Some checks failed
Build and Push Docker Image / build (push) Failing after 1m7s
2025-06-04 15:12:58 +00:00
github-actions[bot]
d7823fcebc Increment version to v3.1.70 2025-06-04 15:06:51 +00:00
16 changed files with 49 additions and 43 deletions

View File

@@ -65,10 +65,7 @@ jobs:
# Push les modifications
git push origin master
- name: Run Changelog CI
uses: saadmk11/changelog-ci@v1.1.2
with:
release_version: ${{ steps.increment_version.outputs.new_version }}
- name: Use server_config_default as primary
run: mv /workspace/CLERC/Reskreen/config/server_config_default.py /workspace/CLERC/Reskreen/config/server_config.py
@@ -91,10 +88,9 @@ jobs:
docker push registry.resk-u.ch/clerc/reskreen:latest
- name: Call webhook $ {{ vars.CLERC_PROD_WEBHOOK}}
- name: Call webhook to maj stack
run: |
echo "Exécution de la commande: curl ${{ vars.CLERC_PROD_WEBHOOK }}"?repo=reskreen
curl ${{ vars.CLERC_PROD_WEBHOOK }}?repo=reskreen
curl -H "Authorization: Bearer ${{ secrets.WEBHOOK_TOKEN_RESKREEN }}" ${{ vars.CLERC_PROD_WEBHOOK }}/reskreen

View File

@@ -1,3 +1,4 @@
test
test 2
test 3
test 4

View File

@@ -19,6 +19,6 @@ RUN python -m venv venv \
EXPOSE 8080
#CMD ["python", "manage.py", "runserver", "0.0.0.0:8080"]
CMD ["sh", "-c", "source venv/bin/activate && python manage.py runserver 0.0.0.0:8080"]
CMD ["sh", "-c", "source venv/bin/activate && python manage.py collectstatic && python manage.py runserver 0.0.0.0:8080"]
#CMD ["./startup.sh"]

View File

@@ -89,8 +89,6 @@ REST_FRAMEWORK = {
LANGUAGE_CODE = 'fr-CH'
if not cfg_dev_mode:
INSTALLED_APPS.append('nextcloud.apps.NextcloudConfig')
MEDIA_URL = '/media/'

View File

@@ -19,10 +19,15 @@ from django.urls import path, include
from django.conf import settings
from django.conf.urls.static import static
from django.views.generic import RedirectView
from django.http import JsonResponse
from . import views
def healthcheck(request):
return JsonResponse({'status': True})
urlpatterns = [
path('', RedirectView.as_view(url='admin/login/', permanent=False), name='/'),
path('admin/', admin.site.urls),
path('robots.txt', views.robots_txt),
path('accounts/', admin.site.urls),
path('collabs/', include('collabs.urls')),
path('vehicules/', include('vehicles.urls')),
@@ -35,6 +40,7 @@ urlpatterns = [
path('editor/', include('django_summernote.urls')),
path('api-auth/', include('rest_framework.urls', namespace='rest_framework')),
path('api/auth/', include('authapp.urls')),
path('healthcheck/', healthcheck),
]

4
Reskreen/views.py Normal file
View File

@@ -0,0 +1,4 @@
from django.http import HttpResponse
def robots_txt(request):
return HttpResponse("User-agent: *\nDisallow: /\n", content_type="text/plain")

View File

@@ -1 +1 @@
v3.1.69
v3.3.2

View File

@@ -17,7 +17,7 @@ class CustomAuthToken(ObtainAuthToken):
def post(self, request, *args, **kwargs):
response = super().post(request, *args, **kwargs)
token = Token.objects.get(key=response.data['token'])
return Response({'token': token.key, 'user_id': token.user_id})
return Response({'token': token.key, 'user_id': token.user_id, 'username': token.user.username})
class RegenerateTokenView(APIView):
permission_classes = [IsAuthenticated]

View File

@@ -1,12 +1,10 @@
from pathlib import Path
import os
BASE_DIR = Path(__file__).resolve().parent.parent
cfg_dev_mode = True
cfg_dev_mode = False
# SECURITY WARNING: keep the secret key used in production secret!
# SECURITY WARNING: keep the secret key used in production secret!
#SECRET_KEY = 'django-prod-j4jd&+4j^t_=@zr(#q@n!8e*58vkql6&_6w-t14ju8pw%ei%^s'
SECRET_KEY = 'django-insecure-j4jd&+4j^t_=@zr(#q@n!8e*58vkql6&_6w-t14ju8pw%ei%^s'
SECRET_KEY = 'django-insecure'
cfg_status_badge = "https://status.resk-u.ch/api/badge/22/uptime/744"
@@ -29,6 +27,7 @@ CORS_ALLOWED_ORIGINS = [
"http://33.144.144.13:4173",
"http://33.144.144.13:5173",
"http://33.144.144.13:3000",
"http://100.126.38.72:5173",
]

View File

@@ -1,2 +1,3 @@
# Exécute la tâche cron toutes les heures
# Exécute la tâche cron toutes les minutes
* * * * * cd /app && python /app/manage.py runcrons > /var/log/runcrons.log
* * * * * curl -s https://status.resk-u.ch/api/push/6zvssVZGQEkLTJACSfHbKoj3rgwArwtp?status=up\&msg=OK\&ping= > /dev/null 2>&1

View File

@@ -2,8 +2,6 @@ version: '3.8'
services:
backend:
image: registry.resk-u.ch/clerc/reskreen:latest
labels:
node.labels.reskreen-ready: 'true'
volumes:
@@ -32,19 +30,6 @@ services:
- main-swarm-network
logging:
driver: json-file
frontend:
image: registry.resk-u.ch/clerc/clerc-frontend:latest
labels:
node.labels.reskreen-ready: 'true'
networks:
- main-swarm-network
configs:
-
source: env-reskreen-frontend
target: /app/frontend-app/.env
logging:
driver: json-file
deploy:
update_config:
delay: 10s
@@ -54,8 +39,21 @@ services:
placement:
constraints:
- node.labels.reskreen-ready==true
frontend:
image: registry.resk-u.ch/clerc/clerc-frontend:latest
networks:
- main-swarm-network
configs:
-
source: env-reskreen-frontend
target: /app/frontend-app/.env
logging:
driver: json-file
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000/"]
test: ["CMD", "curl", "-f", "http://localhost:3000/healthcheck"]
interval: 30s
timeout: 10s
retries: 3

View File

@@ -204,9 +204,9 @@ class cls_caldav():
if "$" in item.key:
item.team_transfert = True
item.key = item.key.replace("$","")
if "Manif" in item.key:
if "manif" in item.key.lower():
item.team_manif = True
item.key = item.key.replace("Manif", "")
item.key = item.key.replace("manif", "").replace("Manif", "").replace("MANIF", "")
item.name = arr[1]
if "&" in item.name:
arr = item.name.split("&")

View File

@@ -198,7 +198,7 @@ def view_team_caldav(request):
o_caldav = cls_caldav(url=caldav_cfg["team"])
o_caldav.get_caldav_data(periode=3)
template = loader.get_template("team/team_view.html")
o_caldav.sort_array_by_key(True)
o_caldav.sort_array_by_key(False)
response = formatResponseArray(o_caldav)
additional_data = {

View File

@@ -6,7 +6,7 @@ from vehicles.models import *
class _vhc_admin(admin.ModelAdmin):
list_display = ('sName', 'nBases', 'nStatus', "bLucas","bDrap")
list_display = ('sName', 'nBases', 'nStatus', "bLucas","bDrap", "nOrder")
ordering = ["nOrder"]

View File

@@ -33,10 +33,10 @@ class cl_Vehicles_Serializer(serializers.ModelSerializer):
fields = '__all__'
def get_technique_infos(self, obj):
enabled_infos = Vehicles_infos.objects.filter(Vehicle=obj, bEnabled=True, nType=1)
enabled_infos = Vehicles_infos.objects.filter(Vehicle=obj, bEnabled=True, nType=1).order_by('-dtCreated')
return cl_Vehicles_infos_Serializer(enabled_infos, many=True).data
def get_matos_infos(self, obj):
enabled_infos = Vehicles_infos.objects.filter(Vehicle=obj, bEnabled=True, nType=2)
enabled_infos = Vehicles_infos.objects.filter(Vehicle=obj, bEnabled=True, nType=2).order_by('-dtCreated')
return cl_Vehicles_infos_Serializer(enabled_infos, many=True).data
def get_perempt_infos_fixes(self, obj):
enabled_infos = Vehicles_infos.objects.filter(Vehicle=obj, bEnabled=True, nType=3)[:3]

View File

@@ -20,9 +20,12 @@ class VehicleViewset(viewsets.ModelViewSet):
ordering = ['nType', 'nStatus', 'nOrder'] # Ordre par défaut
class VehicleInfosViewset(viewsets.ModelViewSet):
queryset = Vehicles_infos.objects.all()
queryset = Vehicles_infos.objects.all().order_by('-id')
serializer_class = cl_Vehicles_infos_Serializer
permission_classes = [CustomPermission_DjangoModel_based]
ordering_fields = ['dtCreated']
ordering = ['dtCreated']
@xframe_options_exempt
def view_vhc(request):