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
7d4e9c56
Unverified
Commit
7d4e9c56
authored
Aug 16, 2019
by
老广
Committed by
GitHub
Aug 16, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3131 from jumpserver/dev
Dev
parents
a5e59e67
088f815a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
7 deletions
+6
-7
remote_app_create_update.html
...ions/templates/applications/remote_app_create_update.html
+4
-5
manager.py
apps/assets/backends/manager.py
+2
-2
No files found.
apps/applications/templates/applications/remote_app_create_update.html
View file @
7d4e9c56
...
...
@@ -110,16 +110,15 @@ function hiddenFields(){
function
constructParams
(
data
)
{
var
typeList
=
[
'chrome'
,
'mysql_workbench'
,
'vmware_client'
,
'custom'
];
var
params
=
{};
for
(
var
type
in
typeList
){
if
(
data
.
type
===
typ
e
){
$
.
each
(
typeList
,
function
(
index
,
value
){
if
(
data
.
type
===
valu
e
){
for
(
var
k
in
data
){
if
(
k
.
startsWith
(
data
.
typ
e
)){
if
(
k
.
startsWith
(
valu
e
)){
params
[
k
]
=
data
[
k
]
}
}
break
}
}
}
);
return
params
;
}
$
(
document
).
ready
(
function
()
{
...
...
apps/assets/backends/manager.py
View file @
7d4e9c56
...
...
@@ -71,9 +71,9 @@ class AssetUserManager:
if
len
(
instances
)
==
1
:
return
instances
[
0
]
elif
len
(
instances
)
==
0
:
self
.
raise_does_not_exist
(
self
.
__name__
)
self
.
raise_does_not_exist
(
self
.
__
class__
.
__
name__
)
else
:
self
.
raise_multiple_return
(
self
.
__name__
,
len
(
instances
))
self
.
raise_multiple_return
(
self
.
__
class__
.
__
name__
,
len
(
instances
))
def
raise_does_not_exist
(
self
,
name
):
raise
self
.
ObjectDoesNotExist
(
self
.
MSG_NOT_EXIST
.
format
(
name
))
...
...
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