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
8 years ago
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):
phone
=
models
.
CharField
(
max_length
=
32
,
blank
=
True
,
verbose_name
=
_
(
'Phone'
))
address
=
models
.
CharField
(
max_length
=
128
,
blank
=
True
,
verbose_name
=
_
(
"Address"
))
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'
))
created_by
=
models
.
CharField
(
max_length
=
32
,
blank
=
True
,
verbose_name
=
_
(
'Created by'
))
comment
=
models
.
TextField
(
blank
=
True
,
verbose_name
=
_
(
'Comment'
))
...
...
@@ -40,7 +40,7 @@ class AssetExtend(models.Model):
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'
))
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'
))
def
__unicode__
(
self
):
...
...
@@ -57,7 +57,7 @@ class AdminUser(models.Model):
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'
))
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'
))
comment
=
models
.
TextField
(
blank
=
True
,
verbose_name
=
_
(
'Comment'
))
...
...
@@ -86,7 +86,7 @@ class SysUser(models.Model):
shell
=
models
.
CharField
(
max_length
=
64
,
blank
=
True
,
verbose_name
=
_
(
'Shell'
))
home
=
models
.
CharField
(
max_length
=
64
,
blank
=
True
,
verbose_name
=
_
(
'Home'
))
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'
))
comment
=
models
.
CharField
(
max_length
=
128
,
blank
=
True
,
verbose_name
=
_
(
'Comment'
))
...
...
@@ -124,7 +124,7 @@ class Asset(models.Model):
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'
))
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'
))
def
__unicode__
(
self
):
...
...
@@ -143,7 +143,7 @@ class Label(models.Model):
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'
))
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'
))
def
__unicode__
(
self
):
...
...
This diff is collapsed.
Click to expand it.
apps/assets/templates/assets/asset_detail.html
View file @
170b4942
...
...
@@ -151,7 +151,7 @@
</tr>
<tr>
<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>
<td
class=
"text-navy"
>
备注
</td>
...
...
This diff is collapsed.
Click to expand it.
apps/users/models.py
View file @
170b4942
...
...
@@ -24,7 +24,7 @@ from django.core import signing
# verbose_name='permissions',
# 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)
# comment = models.CharField(max_length=80, blank=True)
#
...
...
@@ -59,7 +59,7 @@ from django.core import signing
class
UserGroup
(
models
.
Model
):
name
=
models
.
CharField
(
max_length
=
100
,
unique
=
True
,
verbose_name
=
_
(
'Name'
))
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
)
def
__unicode__
(
self
):
...
...
This diff is collapsed.
Click to expand it.
apps/users/views.py
View file @
170b4942
...
...
@@ -169,7 +169,7 @@ class UserGroupListView(AdminUserRequiredMixin, ListView):
paginate_by
=
settings
.
CONFIG
.
DISPLAY_PER_PAGE
context_object_name
=
'user_group_list'
template_name
=
'users/user_group_list.html'
ordering
=
'-date_
add
ed'
ordering
=
'-date_
creat
ed'
def
get_queryset
(
self
):
self
.
queryset
=
super
(
UserGroupListView
,
self
)
.
get_queryset
()
...
...
This diff is collapsed.
Click to expand it.
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