mirror of https://github.com/jumpserver/jumpserver
lots
parent
5a5928483f
commit
02218e624a
|
@ -59,8 +59,8 @@ class AssetGroup(models.Model):
|
|||
|
||||
|
||||
class Asset(models.Model):
|
||||
ip = models.IPAddressField(unique=True)
|
||||
port = models.IntegerField(max_length=6)
|
||||
ip = models.GenericIPAddressField(unique=True)
|
||||
port = models.IntegerField()
|
||||
group = models.ManyToManyField(AssetGroup)
|
||||
username = models.CharField(max_length=20, blank=True, null=True)
|
||||
password = models.CharField(max_length=80, blank=True, null=True)
|
||||
|
|
|
@ -77,7 +77,7 @@ INSTALLED_APPS = (
|
|||
'juser',
|
||||
'jasset',
|
||||
'jperm',
|
||||
# 'jlog',
|
||||
'jlog',
|
||||
)
|
||||
|
||||
MIDDLEWARE_CLASSES = (
|
||||
|
|
|
@ -15,6 +15,7 @@ from jumpserver.api import *
|
|||
from django.contrib.auth import authenticate, login, logout
|
||||
from django.contrib.auth.decorators import login_required
|
||||
from settings import BASE_DIR
|
||||
from jlog.models import Log
|
||||
|
||||
def getDaysByNum(num):
|
||||
today = datetime.date.today()
|
||||
|
|
|
@ -4,7 +4,7 @@ from Crypto.PublicKey import RSA
|
|||
|
||||
from juser.models import AdminGroup
|
||||
from jumpserver.api import *
|
||||
|
||||
from jumpserver.settings import BASE_DIR
|
||||
|
||||
def group_add_user(group, user_id=None, username=None):
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue