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
fd945513
Commit
fd945513
authored
Oct 28, 2016
by
Administrator
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[fix] 修改模型的显示, 因为字段默认会加上Class的Name
parent
51c530c1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
models.py
apps/ops/models.py
+3
-3
No files found.
apps/ops/models.py
View file @
fd945513
...
@@ -18,7 +18,7 @@ class AnsiblePlay(models.Model):
...
@@ -18,7 +18,7 @@ class AnsiblePlay(models.Model):
status_code
=
models
.
IntegerField
(
default
=
0
,
verbose_name
=
_
(
'StatusCode'
))
status_code
=
models
.
IntegerField
(
default
=
0
,
verbose_name
=
_
(
'StatusCode'
))
def
__unicode__
(
self
):
def
__unicode__
(
self
):
return
"
AnsiblePlay:
%
s<
%
s>"
%
(
self
.
name
,
self
.
uuid
)
return
"
%
s<
%
s>"
%
(
self
.
name
,
self
.
uuid
)
class
AnsibleTask
(
models
.
Model
):
class
AnsibleTask
(
models
.
Model
):
...
@@ -27,7 +27,7 @@ class AnsibleTask(models.Model):
...
@@ -27,7 +27,7 @@ class AnsibleTask(models.Model):
name
=
models
.
CharField
(
max_length
=
128
,
blank
=
True
,
verbose_name
=
_
(
'Name'
))
name
=
models
.
CharField
(
max_length
=
128
,
blank
=
True
,
verbose_name
=
_
(
'Name'
))
def
__unicode__
(
self
):
def
__unicode__
(
self
):
return
"
AnsibleTask:
%
s<
%
s>"
%
(
self
.
name
,
self
.
uuid
)
return
"
%
s<
%
s>"
%
(
self
.
name
,
self
.
uuid
)
def
failed
(
self
):
def
failed
(
self
):
pass
pass
...
@@ -47,7 +47,7 @@ class AnsibleHostResult(models.Model):
...
@@ -47,7 +47,7 @@ class AnsibleHostResult(models.Model):
no_host
=
models
.
TextField
(
blank
=
True
,
verbose_name
=
_
(
'NoHost'
))
no_host
=
models
.
TextField
(
blank
=
True
,
verbose_name
=
_
(
'NoHost'
))
def
__unicode__
(
self
):
def
__unicode__
(
self
):
return
"
AnsibleHostResult:
%
s<
%
s>"
%
(
self
.
name
,
str
(
self
.
status
))
return
"
%
s<
%
s>"
%
(
self
.
name
,
str
(
self
.
status
))
@property
@property
def
is_failed
(
self
):
def
is_failed
(
self
):
...
...
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