|
|
@ -16,7 +16,7 @@ from django.views.decorators.cache import cache_page |
|
|
|
from django.views.decorators.csrf import csrf_exempt |
|
|
|
from django.views.decorators.csrf import csrf_exempt |
|
|
|
from django_filters.rest_framework import DjangoFilterBackend |
|
|
|
from django_filters.rest_framework import DjangoFilterBackend |
|
|
|
from django.core.cache import cache |
|
|
|
from django.core.cache import cache |
|
|
|
from update.utils.get_version import GetVersion |
|
|
|
from update.utils.get_version import GetVersion, get_cinema_ver_by_ip |
|
|
|
from rest_framework.decorators import action |
|
|
|
from rest_framework.decorators import action |
|
|
|
from update.utils.git_util import GitUtil, GitDbUtil |
|
|
|
from update.utils.git_util import GitUtil, GitDbUtil |
|
|
|
from update.utils.cmd_extcute import UpdateCommandUtil, UpdateConfigUtil |
|
|
|
from update.utils.cmd_extcute import UpdateCommandUtil, UpdateConfigUtil |
|
|
@ -105,6 +105,10 @@ def get_git_version(request): |
|
|
|
def update_cine(request): |
|
|
|
def update_cine(request): |
|
|
|
req = request.GET.dict() |
|
|
|
req = request.GET.dict() |
|
|
|
cinema_ip = req.get('ip') |
|
|
|
cinema_ip = req.get('ip') |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# 获取当前版本 |
|
|
|
|
|
|
|
org_ver = get_cinema_ver_by_ip(ip=cinema_ip) |
|
|
|
|
|
|
|
|
|
|
|
# 处理命令格式 |
|
|
|
# 处理命令格式 |
|
|
|
cmd_dict = {} |
|
|
|
cmd_dict = {} |
|
|
|
cmd_obj = UpdateCommand.objects.filter(is_sys=0).values('id', 'process') |
|
|
|
cmd_obj = UpdateCommand.objects.filter(is_sys=0).values('id', 'process') |
|
|
|