Compare commits

...

68 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
a147272655 Merge pull request 'Add new VSL app with initial models and admin configuration.' (#28) from vsl into master
Some checks failed
Build and Push Docker Image / build (push) Failing after 1m2s
Reviewed-on: #28
2025-06-04 15:05:21 +00:00
b7710390fa Add new VSL app with initial models and admin configuration.
Created VslDest model with fields for ID, name, creation date, and update date.
Added VslConfig to settings.py.
Configured admin interface for VslDest.
Initialized migrations for VslDest model.
Included basic test and view files for future development.
2025-06-04 15:04:13 +00:00
github-actions[bot]
9702c54572 Increment version to v3.1.69 2025-05-07 14:23:05 +00:00
241b04e6ff change gitea runner contrainte
Some checks failed
Build and Push Docker Image / build (push) Failing after 1m37s
2025-05-07 14:21:51 +00:00
1dc776d888 Merge branch 'master' of https://gitea.prod.resk-u.ch/CLERC/Reskreen
Some checks failed
Build and Push Docker Image / build (push) Has been cancelled
2025-05-07 14:15:53 +00:00
3802a3ce61 changer volume reskreen-data 2025-05-07 14:15:51 +00:00
github-actions[bot]
6688861a95 Increment version to v3.1.68 2025-04-15 15:24:55 +00:00
27 changed files with 179 additions and 49 deletions

View File

@@ -9,7 +9,7 @@ on:
jobs:
build:
if: github.actor != 'github-actions[bot]'
runs-on: self-hosted
#runs-on: self-hosted
container:
image: alpine:latest
steps:
@@ -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

@@ -52,6 +52,7 @@ INSTALLED_APPS = [
'studenteval.apps.StudentevalConfig',
'comm_op.apps.CommOpConfig',
'custom_admin.apps.CustomAdminConfig',
'vsl.apps.VslConfig',
'rangefilter',
'django.contrib.admin',
'carnet_rouge.apps.CarnetRougeConfig',
@@ -88,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.67
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
@@ -67,11 +65,7 @@ networks:
external: true
volumes:
reskreen-data:
driver: local
driver_opts:
device: /home/prod/Reskreen
o: bind
type: none
configs:
env-reskreen-frontend:
external: true

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):

0
vsl/__init__.py Normal file
View File

11
vsl/admin.py Normal file
View File

@@ -0,0 +1,11 @@
from django.contrib import admin
from vsl.models import VslDest
@admin.register(VslDest)
class vsl_destAdmin(admin.ModelAdmin):
list_display = ('id', 'name')
ordering = ('id',)
list_per_page = 100
search_fields = ('name',)

6
vsl/apps.py Normal file
View File

@@ -0,0 +1,6 @@
from django.apps import AppConfig
class VslConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'vsl'

View File

@@ -0,0 +1,23 @@
# Generated by Django 5.0.10 on 2025-06-04 16:48
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='VslDest',
fields=[
('id', models.AutoField(primary_key=True, serialize=False, verbose_name='ID du Suivi')),
('name', models.CharField(max_length=255, verbose_name='Dénomination')),
('date_creation', models.DateTimeField(auto_now_add=True, verbose_name='Date de création')),
('date_modification', models.DateTimeField(auto_now=True, verbose_name='Date de modification')),
],
),
]

View File

@@ -0,0 +1,23 @@
# Generated by Django 5.0.10 on 2025-06-04 16:49
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('vsl', '0001_initial'),
]
operations = [
migrations.RenameField(
model_name='vsldest',
old_name='date_creation',
new_name='dtCreate',
),
migrations.RenameField(
model_name='vsldest',
old_name='date_modification',
new_name='dtUpdate',
),
]

View File

@@ -0,0 +1,18 @@
# Generated by Django 5.0.10 on 2025-06-04 16:50
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('vsl', '0002_rename_date_creation_vsldest_dtcreate_and_more'),
]
operations = [
migrations.RenameField(
model_name='vsldest',
old_name='name',
new_name='dest',
),
]

View File

@@ -0,0 +1,18 @@
# Generated by Django 5.0.10 on 2025-06-04 16:51
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('vsl', '0003_rename_name_vsldest_dest'),
]
operations = [
migrations.RenameField(
model_name='vsldest',
old_name='dest',
new_name='name',
),
]

View File

22
vsl/models.py Normal file
View File

@@ -0,0 +1,22 @@
from django.db import models
class VslDest(models.Model):
# ID auto-incrémenté par défaut
id = models.AutoField("ID du Suivi", primary_key=True)
# Champ de chaîne de caractères avec une longueur maximale de 255 caractères
name = models.CharField("Dénomination", max_length=255)
# Champ pour la date de création, automatiquement défini à la création
dtCreate = models.DateTimeField("Date de création", auto_now_add=True)
# Champ pour la date de modification, automatiquement mis à jour à chaque modification
dtUpdate = models.DateTimeField("Date de modification", auto_now=True)
def __str__(self):
return self.name
class Meta:
verbose_name = "Destination VSL"
verbose_name_plural = "Destinations VSL"
ordering = ["id"]

3
vsl/tests.py Normal file
View File

@@ -0,0 +1,3 @@
from django.test import TestCase
# Create your tests here.

3
vsl/views.py Normal file
View File

@@ -0,0 +1,3 @@
from django.shortcuts import render
# Create your views here.