Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
J
jumpserver
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ops
jumpserver
Commits
170b4942
Commit
170b4942
authored
Sep 06, 2016
by
ibuler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change date_added -> date_created
parent
07dd6d11
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
10 deletions
+10
-10
models.py
apps/assets/models.py
+6
-6
asset_detail.html
apps/assets/templates/assets/asset_detail.html
+1
-1
models.py
apps/users/models.py
+2
-2
views.py
apps/users/views.py
+1
-1
table_design.xml
docs/table_design.xml
+0
-0
No files found.
apps/assets/models.py
View file @
170b4942
...
@@ -24,7 +24,7 @@ class IDC(models.Model):
...
@@ -24,7 +24,7 @@ class IDC(models.Model):
phone
=
models
.
CharField
(
max_length
=
32
,
blank
=
True
,
verbose_name
=
_
(
'Phone'
))
phone
=
models
.
CharField
(
max_length
=
32
,
blank
=
True
,
verbose_name
=
_
(
'Phone'
))
address
=
models
.
CharField
(
max_length
=
128
,
blank
=
True
,
verbose_name
=
_
(
"Address"
))
address
=
models
.
CharField
(
max_length
=
128
,
blank
=
True
,
verbose_name
=
_
(
"Address"
))
network
=
models
.
TextField
(
blank
=
True
,
verbose_name
=
_
(
'Network'
))
network
=
models
.
TextField
(
blank
=
True
,
verbose_name
=
_
(
'Network'
))
date_
add
ed
=
models
.
DateField
(
auto_now
=
True
,
null
=
True
,
verbose_name
=
_
(
'Date added'
))
date_
creat
ed
=
models
.
DateField
(
auto_now
=
True
,
null
=
True
,
verbose_name
=
_
(
'Date added'
))
operator
=
models
.
CharField
(
max_length
=
32
,
blank
=
True
,
verbose_name
=
_
(
'Operator'
))
operator
=
models
.
CharField
(
max_length
=
32
,
blank
=
True
,
verbose_name
=
_
(
'Operator'
))
created_by
=
models
.
CharField
(
max_length
=
32
,
blank
=
True
,
verbose_name
=
_
(
'Created by'
))
created_by
=
models
.
CharField
(
max_length
=
32
,
blank
=
True
,
verbose_name
=
_
(
'Created by'
))
comment
=
models
.
TextField
(
blank
=
True
,
verbose_name
=
_
(
'Comment'
))
comment
=
models
.
TextField
(
blank
=
True
,
verbose_name
=
_
(
'Comment'
))
...
@@ -40,7 +40,7 @@ class AssetExtend(models.Model):
...
@@ -40,7 +40,7 @@ class AssetExtend(models.Model):
key
=
models
.
CharField
(
max_length
=
64
,
null
=
True
,
blank
=
True
,
verbose_name
=
_
(
'KEY'
))
key
=
models
.
CharField
(
max_length
=
64
,
null
=
True
,
blank
=
True
,
verbose_name
=
_
(
'KEY'
))
value
=
models
.
CharField
(
max_length
=
64
,
null
=
True
,
blank
=
True
,
verbose_name
=
_
(
'VALUE'
))
value
=
models
.
CharField
(
max_length
=
64
,
null
=
True
,
blank
=
True
,
verbose_name
=
_
(
'VALUE'
))
created_by
=
models
.
CharField
(
max_length
=
32
,
blank
=
True
,
verbose_name
=
_
(
"Created by"
))
created_by
=
models
.
CharField
(
max_length
=
32
,
blank
=
True
,
verbose_name
=
_
(
"Created by"
))
date_
add
ed
=
models
.
DateTimeField
(
auto_now
=
True
,
null
=
True
,
blank
=
True
)
date_
creat
ed
=
models
.
DateTimeField
(
auto_now
=
True
,
null
=
True
,
blank
=
True
)
comment
=
models
.
TextField
(
blank
=
True
,
verbose_name
=
_
(
'Comment'
))
comment
=
models
.
TextField
(
blank
=
True
,
verbose_name
=
_
(
'Comment'
))
def
__unicode__
(
self
):
def
__unicode__
(
self
):
...
@@ -57,7 +57,7 @@ class AdminUser(models.Model):
...
@@ -57,7 +57,7 @@ class AdminUser(models.Model):
private_key
=
models
.
CharField
(
max_length
=
4096
,
null
=
True
,
blank
=
True
,
verbose_name
=
_
(
'SSH private key'
))
private_key
=
models
.
CharField
(
max_length
=
4096
,
null
=
True
,
blank
=
True
,
verbose_name
=
_
(
'SSH private key'
))
is_default
=
models
.
BooleanField
(
default
=
True
,
verbose_name
=
_
(
'As default'
))
is_default
=
models
.
BooleanField
(
default
=
True
,
verbose_name
=
_
(
'As default'
))
auto_update
=
models
.
BooleanField
(
default
=
True
,
verbose_name
=
_
(
'Auto update pass/key'
))
auto_update
=
models
.
BooleanField
(
default
=
True
,
verbose_name
=
_
(
'Auto update pass/key'
))
date_
add
ed
=
models
.
DateTimeField
(
auto_now
=
True
,
null
=
True
,
blank
=
True
)
date_
creat
ed
=
models
.
DateTimeField
(
auto_now
=
True
,
null
=
True
,
blank
=
True
)
create_by
=
models
.
CharField
(
max_length
=
32
,
null
=
True
,
blank
=
True
,
verbose_name
=
_
(
'Created by'
))
create_by
=
models
.
CharField
(
max_length
=
32
,
null
=
True
,
blank
=
True
,
verbose_name
=
_
(
'Created by'
))
comment
=
models
.
TextField
(
blank
=
True
,
verbose_name
=
_
(
'Comment'
))
comment
=
models
.
TextField
(
blank
=
True
,
verbose_name
=
_
(
'Comment'
))
...
@@ -86,7 +86,7 @@ class SysUser(models.Model):
...
@@ -86,7 +86,7 @@ class SysUser(models.Model):
shell
=
models
.
CharField
(
max_length
=
64
,
blank
=
True
,
verbose_name
=
_
(
'Shell'
))
shell
=
models
.
CharField
(
max_length
=
64
,
blank
=
True
,
verbose_name
=
_
(
'Shell'
))
home
=
models
.
CharField
(
max_length
=
64
,
blank
=
True
,
verbose_name
=
_
(
'Home'
))
home
=
models
.
CharField
(
max_length
=
64
,
blank
=
True
,
verbose_name
=
_
(
'Home'
))
uid
=
models
.
IntegerField
(
blank
=
True
,
verbose_name
=
_
(
'Uid'
))
uid
=
models
.
IntegerField
(
blank
=
True
,
verbose_name
=
_
(
'Uid'
))
date_
add
ed
=
models
.
DateTimeField
(
auto_now
=
True
,
null
=
True
)
date_
creat
ed
=
models
.
DateTimeField
(
auto_now
=
True
,
null
=
True
)
create_by
=
models
.
CharField
(
max_length
=
32
,
blank
=
True
,
verbose_name
=
_
(
'Created by'
))
create_by
=
models
.
CharField
(
max_length
=
32
,
blank
=
True
,
verbose_name
=
_
(
'Created by'
))
comment
=
models
.
CharField
(
max_length
=
128
,
blank
=
True
,
verbose_name
=
_
(
'Comment'
))
comment
=
models
.
CharField
(
max_length
=
128
,
blank
=
True
,
verbose_name
=
_
(
'Comment'
))
...
@@ -124,7 +124,7 @@ class Asset(models.Model):
...
@@ -124,7 +124,7 @@ class Asset(models.Model):
sn
=
models
.
CharField
(
max_length
=
128
,
null
=
True
,
blank
=
True
,
unique
=
True
,
verbose_name
=
_
(
'Serial number'
))
sn
=
models
.
CharField
(
max_length
=
128
,
null
=
True
,
blank
=
True
,
unique
=
True
,
verbose_name
=
_
(
'Serial number'
))
created_by
=
models
.
CharField
(
max_length
=
32
,
null
=
True
,
blank
=
True
,
verbose_name
=
_
(
'Created by'
))
created_by
=
models
.
CharField
(
max_length
=
32
,
null
=
True
,
blank
=
True
,
verbose_name
=
_
(
'Created by'
))
is_active
=
models
.
BooleanField
(
default
=
True
,
verbose_name
=
_
(
'Is active'
))
is_active
=
models
.
BooleanField
(
default
=
True
,
verbose_name
=
_
(
'Is active'
))
date_
add
ed
=
models
.
DateTimeField
(
auto_now
=
True
,
null
=
True
,
blank
=
True
,
verbose_name
=
_
(
'Date added'
))
date_
creat
ed
=
models
.
DateTimeField
(
auto_now
=
True
,
null
=
True
,
blank
=
True
,
verbose_name
=
_
(
'Date added'
))
comment
=
models
.
CharField
(
max_length
=
128
,
null
=
True
,
blank
=
True
,
verbose_name
=
_
(
'Comment'
))
comment
=
models
.
CharField
(
max_length
=
128
,
null
=
True
,
blank
=
True
,
verbose_name
=
_
(
'Comment'
))
def
__unicode__
(
self
):
def
__unicode__
(
self
):
...
@@ -143,7 +143,7 @@ class Label(models.Model):
...
@@ -143,7 +143,7 @@ class Label(models.Model):
value
=
models
.
CharField
(
max_length
=
64
,
null
=
True
,
blank
=
True
,
verbose_name
=
_
(
'VALUE'
))
value
=
models
.
CharField
(
max_length
=
64
,
null
=
True
,
blank
=
True
,
verbose_name
=
_
(
'VALUE'
))
asset
=
models
.
ForeignKey
(
Asset
,
null
=
True
,
blank
=
True
,
on_delete
=
models
.
SET_NULL
,
verbose_name
=
_
(
'Asset'
))
asset
=
models
.
ForeignKey
(
Asset
,
null
=
True
,
blank
=
True
,
on_delete
=
models
.
SET_NULL
,
verbose_name
=
_
(
'Asset'
))
created_by
=
models
.
CharField
(
max_length
=
32
,
blank
=
True
,
verbose_name
=
_
(
"Created by"
))
created_by
=
models
.
CharField
(
max_length
=
32
,
blank
=
True
,
verbose_name
=
_
(
"Created by"
))
date_
add
ed
=
models
.
DateTimeField
(
auto_now
=
True
,
null
=
True
)
date_
creat
ed
=
models
.
DateTimeField
(
auto_now
=
True
,
null
=
True
)
comment
=
models
.
CharField
(
max_length
=
128
,
blank
=
True
,
verbose_name
=
_
(
'Comment'
))
comment
=
models
.
CharField
(
max_length
=
128
,
blank
=
True
,
verbose_name
=
_
(
'Comment'
))
def
__unicode__
(
self
):
def
__unicode__
(
self
):
...
...
apps/assets/templates/assets/asset_detail.html
View file @
170b4942
...
@@ -151,7 +151,7 @@
...
@@ -151,7 +151,7 @@
</tr>
</tr>
<tr>
<tr>
<td
class=
"text-navy"
>
添加日期
</td>
<td
class=
"text-navy"
>
添加日期
</td>
<td>
{{ asset.date_
add
ed|date:"Y-m-d H:i:s" }}
</td>
<td>
{{ asset.date_
creat
ed|date:"Y-m-d H:i:s" }}
</td>
</tr>
</tr>
<tr>
<tr>
<td
class=
"text-navy"
>
备注
</td>
<td
class=
"text-navy"
>
备注
</td>
...
...
apps/users/models.py
View file @
170b4942
...
@@ -24,7 +24,7 @@ from django.core import signing
...
@@ -24,7 +24,7 @@ from django.core import signing
# verbose_name='permissions',
# verbose_name='permissions',
# blank=True,
# blank=True,
# )
# )
# date_
add
ed = models.DateTimeField(auto_now_add=True)
# date_
creat
ed = models.DateTimeField(auto_now_add=True)
# created_by = models.CharField(max_length=100)
# created_by = models.CharField(max_length=100)
# comment = models.CharField(max_length=80, blank=True)
# comment = models.CharField(max_length=80, blank=True)
#
#
...
@@ -59,7 +59,7 @@ from django.core import signing
...
@@ -59,7 +59,7 @@ from django.core import signing
class
UserGroup
(
models
.
Model
):
class
UserGroup
(
models
.
Model
):
name
=
models
.
CharField
(
max_length
=
100
,
unique
=
True
,
verbose_name
=
_
(
'Name'
))
name
=
models
.
CharField
(
max_length
=
100
,
unique
=
True
,
verbose_name
=
_
(
'Name'
))
comment
=
models
.
TextField
(
blank
=
True
,
verbose_name
=
_
(
'Comment'
))
comment
=
models
.
TextField
(
blank
=
True
,
verbose_name
=
_
(
'Comment'
))
date_
add
ed
=
models
.
DateTimeField
(
auto_now_add
=
True
)
date_
creat
ed
=
models
.
DateTimeField
(
auto_now_add
=
True
)
created_by
=
models
.
CharField
(
max_length
=
100
)
created_by
=
models
.
CharField
(
max_length
=
100
)
def
__unicode__
(
self
):
def
__unicode__
(
self
):
...
...
apps/users/views.py
View file @
170b4942
...
@@ -169,7 +169,7 @@ class UserGroupListView(AdminUserRequiredMixin, ListView):
...
@@ -169,7 +169,7 @@ class UserGroupListView(AdminUserRequiredMixin, ListView):
paginate_by
=
settings
.
CONFIG
.
DISPLAY_PER_PAGE
paginate_by
=
settings
.
CONFIG
.
DISPLAY_PER_PAGE
context_object_name
=
'user_group_list'
context_object_name
=
'user_group_list'
template_name
=
'users/user_group_list.html'
template_name
=
'users/user_group_list.html'
ordering
=
'-date_
add
ed'
ordering
=
'-date_
creat
ed'
def
get_queryset
(
self
):
def
get_queryset
(
self
):
self
.
queryset
=
super
(
UserGroupListView
,
self
)
.
get_queryset
()
self
.
queryset
=
super
(
UserGroupListView
,
self
)
.
get_queryset
()
...
...
docs/table_design.xml
View file @
170b4942
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment