mirror of https://github.com/jumpserver/jumpserver
perf: 资产支持 console
parent
f41b9e8bcf
commit
44c78de941
|
@ -1,35 +1,35 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
#
|
#
|
||||||
import urllib.parse
|
|
||||||
import json
|
|
||||||
from typing import Callable
|
|
||||||
import os
|
|
||||||
import base64
|
import base64
|
||||||
import ctypes
|
import ctypes
|
||||||
|
import json
|
||||||
|
import os
|
||||||
|
import urllib.parse
|
||||||
|
from typing import Callable
|
||||||
|
|
||||||
from django.core.cache import cache
|
from django.core.cache import cache
|
||||||
from django.shortcuts import get_object_or_404
|
|
||||||
from django.http import HttpResponse
|
from django.http import HttpResponse
|
||||||
|
from django.shortcuts import get_object_or_404
|
||||||
from django.utils import timezone
|
from django.utils import timezone
|
||||||
from django.utils.translation import ugettext as _
|
from django.utils.translation import ugettext as _
|
||||||
from rest_framework.response import Response
|
from rest_framework import serializers
|
||||||
from rest_framework.request import Request
|
|
||||||
from rest_framework.viewsets import GenericViewSet
|
|
||||||
from rest_framework.decorators import action
|
from rest_framework.decorators import action
|
||||||
from rest_framework.exceptions import PermissionDenied
|
from rest_framework.exceptions import PermissionDenied
|
||||||
from rest_framework import serializers
|
from rest_framework.request import Request
|
||||||
|
from rest_framework.response import Response
|
||||||
|
from rest_framework.viewsets import GenericViewSet
|
||||||
|
|
||||||
from applications.models import Application
|
from applications.models import Application
|
||||||
from authentication.signals import post_auth_failed
|
from authentication.signals import post_auth_failed
|
||||||
from common.utils import get_logger, random_string
|
from common.const.http import PATCH
|
||||||
|
from common.http import is_true
|
||||||
from common.mixins.api import SerializerMixin
|
from common.mixins.api import SerializerMixin
|
||||||
|
from common.utils import get_logger, random_string
|
||||||
from common.utils.common import get_file_by_arch
|
from common.utils.common import get_file_by_arch
|
||||||
from orgs.mixins.api import RootOrgViewMixin
|
from orgs.mixins.api import RootOrgViewMixin
|
||||||
from common.http import is_true
|
|
||||||
from perms.models.base import Action
|
from perms.models.base import Action
|
||||||
from perms.utils.application.permission import get_application_actions
|
from perms.utils.application.permission import get_application_actions
|
||||||
from perms.utils.asset.permission import get_asset_actions
|
from perms.utils.asset.permission import get_asset_actions
|
||||||
from common.const.http import PATCH
|
|
||||||
from terminal.models import EndpointRule
|
from terminal.models import EndpointRule
|
||||||
from ..serializers import (
|
from ..serializers import (
|
||||||
ConnectionTokenSerializer, ConnectionTokenSecretSerializer, SuperConnectionTokenSerializer
|
ConnectionTokenSerializer, ConnectionTokenSecretSerializer, SuperConnectionTokenSerializer
|
||||||
|
@ -151,6 +151,8 @@ class ClientProtocolMixin:
|
||||||
|
|
||||||
if asset:
|
if asset:
|
||||||
name = asset.hostname
|
name = asset.hostname
|
||||||
|
if asset.platform.meta.get('console', None) == 'true':
|
||||||
|
options['administrative session:i:'] = '1'
|
||||||
elif application:
|
elif application:
|
||||||
name = application.name
|
name = application.name
|
||||||
application.get_rdp_remote_app_setting()
|
application.get_rdp_remote_app_setting()
|
||||||
|
|
Loading…
Reference in New Issue