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
9979fdf6
Commit
9979fdf6
authored
Dec 11, 2015
by
ibuler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bugfix
parent
280560f2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
7 deletions
+8
-7
ansible_api.py
jperm/ansible_api.py
+7
-6
perm_rule_add.html
templates/jperm/perm_rule_add.html
+1
-1
No files found.
jperm/ansible_api.py
View file @
9979fdf6
# -*- coding: utf-8 -*-
from
tempfile
import
NamedTemporaryFile
import
os.path
from
ansible.inventory.group
import
Group
from
ansible.inventory.host
import
Host
from
ansible.inventory
import
Inventory
from
ansible.runner
import
Runner
from
ansible.playbook
import
PlayBook
from
ansible
import
callbacks
from
ansible
import
utils
import
ansible.constants
as
C
from
passlib.hash
import
sha512_crypt
from
django.template.loader
import
get_template
from
django.template
import
Context
from
utils
import
get_rand_pass
from
jumpserver.api
import
logger
from
tempfile
import
NamedTemporaryFile
from
django.template.loader
import
get_template
from
django.template
import
Context
import
os.path
API_DIR
=
os
.
path
.
dirname
(
os
.
path
.
abspath
(
__file__
))
ANSIBLE_DIR
=
os
.
path
.
join
(
API_DIR
,
'playbooks'
)
C
.
HOST_KEY_CHECKING
=
False
class
AnsibleError
(
StandardError
):
...
...
templates/jperm/perm_rule_add.html
View file @
9979fdf6
...
...
@@ -133,7 +133,7 @@ $('#ruleForm').validator({
fields
:
{
"name"
:
{
rule
:
"required
;check_name
"
,
rule
:
"required"
,
tip
:
"输入规则名称"
,
msg
:
{
required
:
"规则名称必填"
}
},
...
...
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