mirror of https://github.com/jumpserver/jumpserver
[Bugfix] 修复资产列表显示bug
parent
681ddb5af2
commit
d3109a03b2
|
@ -0,0 +1,27 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
|
||||
import uuid
|
||||
from django.db import models
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
|
||||
class Label(models.Model):
|
||||
SYSTEM_CATEGORY = "S"
|
||||
USER_CATEGORY = "U"
|
||||
CATEGORY_CHOICES = (
|
||||
("S", _("System")),
|
||||
("U", _("User"))
|
||||
)
|
||||
id = models.UUIDField(default=uuid.uuid4, primary_key=True)
|
||||
name = models.CharField(max_length=128, verbose_name=_("Name"))
|
||||
alias = models.CharField(max_length=128, verbose_name=_("Alias"), blank=True)
|
||||
value = models.CharField(max_length=128, verbose_name=_("Value"))
|
||||
category = models.CharField(max_length=128, choices=CATEGORY_CHOICES, verbose_name=_("Category"))
|
||||
is_active = models.BooleanField(default=False, verbose_name=_("Is active"))
|
||||
date_created = models.DateTimeField(
|
||||
auto_now_add=True, null=True, blank=True, verbose_name=_('Date created')
|
||||
)
|
||||
|
||||
class Meta:
|
||||
db_table = "assets_label"
|
|
@ -121,7 +121,7 @@ function initTable() {
|
|||
{data: "type" }, {data: "is_connective" }],
|
||||
op_html: $('#actions').html()
|
||||
};
|
||||
jumpserver.initDataTable(options);
|
||||
jumpserver.initServerSideDataTable(options);
|
||||
}
|
||||
|
||||
$(document).ready(function () {
|
||||
|
|
|
@ -184,7 +184,7 @@ function initTable() {
|
|||
{data: "get_type_display" }, {data: "is_connective" }, {data: "id"}],
|
||||
op_html: $('#actions').html()
|
||||
};
|
||||
jumpserver.initDataTable(options);
|
||||
jumpserver.initServerSideDataTable(options);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -176,7 +176,7 @@ function initTable() {
|
|||
{data: "get_type_display" }, {data: "is_connective" }, {data: "id"}],
|
||||
op_html: $('#actions').html()
|
||||
};
|
||||
jumpserver.initDataTable(options);
|
||||
jumpserver.initServerSideDataTable(options);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -121,7 +121,7 @@ function initAssetsTable() {
|
|||
columns: [{data: "hostname" }, {data: "ip" }, {data: "port" }, {data: "hostname" }],
|
||||
op_html: $('#actions').html()
|
||||
};
|
||||
jumpserver.initDataTable(options);
|
||||
jumpserver.initServerSideDataTable(options);
|
||||
}
|
||||
|
||||
$(document).ready(function () {
|
||||
|
|
Loading…
Reference in New Issue