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
115c7c4d
Commit
115c7c4d
authored
Mar 06, 2018
by
fit2cloud-fengyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add ignore
parent
094e862a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
84 additions
and
0 deletions
+84
-0
0001_initial.py
apps/ops/migrations/0001_initial.py
+84
-0
__init__.py
apps/ops/migrations/__init__.py
+0
-0
No files found.
apps/ops/migrations/0001_initial.py
0 → 100644
View file @
115c7c4d
# -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2017-12-24 15:21
from
__future__
import
unicode_literals
from
django.db
import
migrations
,
models
import
django.db.models.deletion
import
uuid
class
Migration
(
migrations
.
Migration
):
initial
=
True
dependencies
=
[
]
operations
=
[
migrations
.
CreateModel
(
name
=
'AdHoc'
,
fields
=
[
(
'id'
,
models
.
UUIDField
(
default
=
uuid
.
uuid4
,
primary_key
=
True
,
serialize
=
False
)),
(
'_tasks'
,
models
.
TextField
(
verbose_name
=
'Tasks'
)),
(
'pattern'
,
models
.
CharField
(
default
=
'{}'
,
max_length
=
64
,
verbose_name
=
'Pattern'
)),
(
'_options'
,
models
.
CharField
(
default
=
''
,
max_length
=
1024
,
verbose_name
=
'Options'
)),
(
'_hosts'
,
models
.
TextField
(
blank
=
True
,
verbose_name
=
'Hosts'
)),
(
'run_as_admin'
,
models
.
BooleanField
(
default
=
False
,
verbose_name
=
'Run as admin'
)),
(
'run_as'
,
models
.
CharField
(
default
=
''
,
max_length
=
128
,
verbose_name
=
'Run as'
)),
(
'_become'
,
models
.
CharField
(
default
=
''
,
max_length
=
1024
,
verbose_name
=
'Become'
)),
(
'created_by'
,
models
.
CharField
(
default
=
''
,
max_length
=
64
,
null
=
True
,
verbose_name
=
'Create by'
)),
(
'date_created'
,
models
.
DateTimeField
(
auto_now_add
=
True
)),
],
options
=
{
'db_table'
:
'ops_adhoc'
,
'get_latest_by'
:
'date_created'
,
},
),
migrations
.
CreateModel
(
name
=
'AdHocRunHistory'
,
fields
=
[
(
'id'
,
models
.
UUIDField
(
default
=
uuid
.
uuid4
,
primary_key
=
True
,
serialize
=
False
)),
(
'date_start'
,
models
.
DateTimeField
(
auto_now_add
=
True
,
verbose_name
=
'Start time'
)),
(
'date_finished'
,
models
.
DateTimeField
(
blank
=
True
,
null
=
True
,
verbose_name
=
'End time'
)),
(
'timedelta'
,
models
.
FloatField
(
default
=
0.0
,
null
=
True
,
verbose_name
=
'Time'
)),
(
'is_finished'
,
models
.
BooleanField
(
default
=
False
,
verbose_name
=
'Is finished'
)),
(
'is_success'
,
models
.
BooleanField
(
default
=
False
,
verbose_name
=
'Is success'
)),
(
'_result'
,
models
.
TextField
(
blank
=
True
,
null
=
True
,
verbose_name
=
'Adhoc raw result'
)),
(
'_summary'
,
models
.
TextField
(
blank
=
True
,
null
=
True
,
verbose_name
=
'Adhoc result summary'
)),
(
'adhoc'
,
models
.
ForeignKey
(
null
=
True
,
on_delete
=
django
.
db
.
models
.
deletion
.
SET_NULL
,
related_name
=
'history'
,
to
=
'ops.AdHoc'
)),
],
options
=
{
'db_table'
:
'ops_adhoc_history'
,
'get_latest_by'
:
'date_start'
,
},
),
migrations
.
CreateModel
(
name
=
'Task'
,
fields
=
[
(
'id'
,
models
.
UUIDField
(
default
=
uuid
.
uuid4
,
primary_key
=
True
,
serialize
=
False
)),
(
'name'
,
models
.
CharField
(
max_length
=
128
,
unique
=
True
,
verbose_name
=
'Name'
)),
(
'interval'
,
models
.
IntegerField
(
blank
=
True
,
help_text
=
'Units: seconds'
,
null
=
True
,
verbose_name
=
'Interval'
)),
(
'crontab'
,
models
.
CharField
(
blank
=
True
,
help_text
=
'5 * * * *'
,
max_length
=
128
,
null
=
True
,
verbose_name
=
'Crontab'
)),
(
'is_periodic'
,
models
.
BooleanField
(
default
=
False
)),
(
'callback'
,
models
.
CharField
(
blank
=
True
,
max_length
=
128
,
null
=
True
,
verbose_name
=
'Callback'
)),
(
'is_deleted'
,
models
.
BooleanField
(
default
=
False
)),
(
'comment'
,
models
.
TextField
(
blank
=
True
,
verbose_name
=
'Comment'
)),
(
'created_by'
,
models
.
CharField
(
blank
=
True
,
default
=
''
,
max_length
=
128
,
null
=
True
)),
(
'date_created'
,
models
.
DateTimeField
(
auto_now_add
=
True
)),
],
options
=
{
'db_table'
:
'ops_task'
,
'get_latest_by'
:
'date_created'
,
},
),
migrations
.
AddField
(
model_name
=
'adhocrunhistory'
,
name
=
'task'
,
field
=
models
.
ForeignKey
(
null
=
True
,
on_delete
=
django
.
db
.
models
.
deletion
.
SET_NULL
,
related_name
=
'history'
,
to
=
'ops.Task'
),
),
migrations
.
AddField
(
model_name
=
'adhoc'
,
name
=
'task'
,
field
=
models
.
ForeignKey
(
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
related_name
=
'adhoc'
,
to
=
'ops.Task'
),
),
]
apps/ops/migrations/__init__.py
0 → 100644
View file @
115c7c4d
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