big untested try of cmm
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 4s

This commit is contained in:
pierre.geeraert
2026-09-08 10:08:35 +01:00
parent 8d6234927c
commit f0b700a688
4 changed files with 19 additions and 10 deletions
+13 -3
View File
@@ -1,7 +1,7 @@
from django.contrib import admin,messages
from django.utils.translation import ngettext
from .models import Deployment_Data,Schedule_Day_Data,Schedule_Week_Data,Namespace_Data,namespace_cmm_data_object
from .utils import import_namespace
from .utils import import_namespace,import_deployment
from apps.kubernetes_connection.utils import scale_up,scale_down
DB = 'cloudmanager_db'
@@ -50,10 +50,20 @@ def import_namespace_admin(modeladmin, request, queryset):
#
# don't forgot to clear thge quyeryset before running this
#
import_namespace(namespace_cmm_data_object)
print("simpsons_data_object.create(season=2, episode=3, url='google.com'', seen=True)")
import_namespace(Namespace_Data.objects)
#print("simpsons_data_object.create(season=2, episode=3, url='google.com'', seen=True)")
#call function to trigger refresh of all deploy
@admin.action(description="import deployment")
def import_deployment_admin(modeladmin, request, queryset):
#
#
#
# don't forgot to clear thge quyeryset before running this
#
import_deployment(Deployment_Data.objects)
class ActiveAtHourFilter(admin.SimpleListFilter):
title = 'Active at hour'