This commit is contained in:
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user