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
e6037303
Unverified
Commit
e6037303
authored
Jul 08, 2019
by
老广
Committed by
GitHub
Jul 08, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2908 from jumpserver/dev
[Update] 修复创建资产是协议bug
parents
65060a94
c0cff6d1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
4 deletions
+10
-4
asset_create.html
apps/assets/templates/assets/asset_create.html
+9
-3
django.po
apps/locale/zh/LC_MESSAGES/django.po
+1
-1
No files found.
apps/assets/templates/assets/asset_create.html
View file @
e6037303
...
@@ -164,9 +164,15 @@ $(document).ready(function () {
...
@@ -164,9 +164,15 @@ $(document).ready(function () {
if
(
protocol
===
""
)
{
if
(
protocol
===
""
)
{
return
return
}
}
if
(
protocolLen
===
0
)
{
var
formNameNum
=
[
0
];
protocolLen
=
protocolsRef
.
length
;
protocolsRef
.
children
().
find
(
"select"
).
each
(
function
(
i
,
v
)
{
}
var
fieldName
=
$
(
v
).
attr
(
"name"
);
var
num
=
fieldName
.
split
(
'-'
)[
1
];
formNameNum
.
push
(
parseInt
(
num
));
});
var
protocolLenLast
=
Math
.
max
(...
formNameNum
);
protocolLen
=
protocolLenLast
+
1
;
var
selectName
=
"form-"
+
protocolLen
+
"-name"
;
var
selectName
=
"form-"
+
protocolLen
+
"-name"
;
var
selectId
=
"id_"
+
selectName
;
var
selectId
=
"id_"
+
selectName
;
var
portName
=
"form-"
+
protocolLen
+
"-port"
;
var
portName
=
"form-"
+
protocolLen
+
"-port"
;
...
...
apps/locale/zh/LC_MESSAGES/django.po
View file @
e6037303
...
@@ -1216,7 +1216,7 @@ msgstr "连接"
...
@@ -1216,7 +1216,7 @@ msgstr "连接"
#: assets/serializers/asset.py:21
#: assets/serializers/asset.py:21
msgid "Protocol format should {}/{}"
msgid "Protocol format should {}/{}"
msgstr ""
msgstr "
协议格式 {}/{}
"
#: assets/serializers/asset.py:38
#: assets/serializers/asset.py:38
msgid "Protocol duplicate: {}"
msgid "Protocol duplicate: {}"
...
...
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