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
7773c302
Commit
7773c302
authored
Dec 20, 2018
by
ibuler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Update] 增加索引
parent
231c907c
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
3 deletions
+15
-3
node.py
apps/assets/models/node.py
+0
-1
0005_auto_20181219_1807.py
apps/ops/migrations/0005_auto_20181219_1807.py
+13
-0
adhoc.py
apps/ops/models/adhoc.py
+1
-1
celery.py
apps/ops/models/celery.py
+1
-1
No files found.
apps/assets/models/node.py
View file @
7773c302
...
...
@@ -29,7 +29,6 @@ class Node(OrgModelMixin):
class
Meta
:
verbose_name
=
_
(
"Node"
)
ordering
=
(
'key'
,)
def
__str__
(
self
):
return
self
.
full_value
...
...
apps/ops/migrations/0005_auto_20181219_1807.py
View file @
7773c302
...
...
@@ -15,4 +15,17 @@ class Migration(migrations.Migration):
name
=
'date_created'
,
field
=
models
.
DateTimeField
(
auto_now_add
=
True
,
db_index
=
True
),
),
migrations
.
AlterField
(
model_name
=
'adhoc'
,
name
=
'date_created'
,
field
=
models
.
DateTimeField
(
auto_now_add
=
True
,
db_index
=
True
),
),
migrations
.
AlterField
(
model_name
=
'celerytask'
,
name
=
'status'
,
field
=
models
.
CharField
(
choices
=
[(
'waiting'
,
'waiting'
),
(
'running'
,
'running'
),
(
'finished'
,
'finished'
)],
db_index
=
True
,
max_length
=
128
),
),
]
apps/ops/models/adhoc.py
View file @
7773c302
...
...
@@ -164,7 +164,7 @@ class AdHoc(models.Model):
run_as
=
models
.
ForeignKey
(
'assets.SystemUser'
,
null
=
True
,
on_delete
=
models
.
CASCADE
)
_become
=
models
.
CharField
(
max_length
=
1024
,
default
=
''
,
verbose_name
=
_
(
"Become"
))
created_by
=
models
.
CharField
(
max_length
=
64
,
default
=
''
,
null
=
True
,
verbose_name
=
_
(
'Create by'
))
date_created
=
models
.
DateTimeField
(
auto_now_add
=
True
)
date_created
=
models
.
DateTimeField
(
auto_now_add
=
True
,
db_index
=
True
)
@property
def
tasks
(
self
):
...
...
apps/ops/models/celery.py
View file @
7773c302
...
...
@@ -19,7 +19,7 @@ class CeleryTask(models.Model):
)
id
=
models
.
UUIDField
(
primary_key
=
True
,
default
=
uuid
.
uuid4
)
name
=
models
.
CharField
(
max_length
=
1024
)
status
=
models
.
CharField
(
max_length
=
128
,
choices
=
STATUS_CHOICES
)
status
=
models
.
CharField
(
max_length
=
128
,
choices
=
STATUS_CHOICES
,
db_index
=
True
)
log_path
=
models
.
CharField
(
max_length
=
256
,
blank
=
True
,
null
=
True
)
date_published
=
models
.
DateTimeField
(
auto_now_add
=
True
)
date_start
=
models
.
DateTimeField
(
null
=
True
)
...
...
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