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
56a47b6b
Commit
56a47b6b
authored
Jan 25, 2019
by
ibuler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Update] 存储添加说明
parent
1dbcf4e3
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
7 deletions
+18
-7
replay_storage_create.html
apps/common/templates/common/replay_storage_create.html
+18
-7
No files found.
apps/common/templates/common/replay_storage_create.html
View file @
56a47b6b
...
@@ -108,15 +108,18 @@
...
@@ -108,15 +108,18 @@
<label
class=
"col-md-2 control-label"
for=
"id_endpoint"
>
{% trans "Endpoint" %}
</label>
<label
class=
"col-md-2 control-label"
for=
"id_endpoint"
>
{% trans "Endpoint" %}
</label>
<div
class=
"col-md-9"
>
<div
class=
"col-md-9"
>
<input
id=
"id_endpoint"
class=
"form-control"
type=
"text"
name=
"ENDPOINT"
value=
""
placeholder=
"Endpoint"
>
<input
id=
"id_endpoint"
class=
"form-control"
type=
"text"
name=
"ENDPOINT"
value=
""
placeholder=
"Endpoint"
>
<div
class=
"help-block"
>
<span
class=
"oss"
>
OSS: 格式 http://{REGION_NAME}.aliyuncs.com
<br>
如: http://oss-cn-hangzhou.aliyuncs.com
</span>
<span
class=
"s3"
>
S3: http://s3.amazonaws.com
<br>
</span>
<span
class=
"s3"
>
S3中国: http://s3.amazonaws.com.cn
<br></span>
</div>
</div>
</div>
</div>
</div>
<div
class=
"form-group"
style=
"display: none;"
>
<div
class=
"form-group"
style=
"display: none;"
>
<label
class=
"col-md-2 control-label"
for=
"id_endpoint_suffix"
>
{% trans "Endpoint suffix" %}
</label>
<label
class=
"col-md-2 control-label"
for=
"id_endpoint_suffix"
>
{% trans "Endpoint suffix" %}
</label>
{#
<div
class=
"col-md-9"
>
#}
{#
<input
id=
"id_endpoint_suffix"
class=
"form-control"
type=
"text"
name=
"ENDPOINT_SUFFIX"
value=
""
>
#}
{#
<div
class=
"help-block"
>
{% trans '' %}
</div>
#}
{#
</div>
#}
<div
class=
"col-md-9"
>
<div
class=
"col-md-9"
>
<select
id=
"id_endpoint_suffix"
name=
"ENDPOINT_SUFFIX"
class=
"endpoint-suffix-selector form-control"
>
<select
id=
"id_endpoint_suffix"
name=
"ENDPOINT_SUFFIX"
class=
"endpoint-suffix-selector form-control"
>
<option
value=
"core.chinacloudapi.cn"
selected=
"selected"
>
core.chinacloudapi.cn
</option>
<option
value=
"core.chinacloudapi.cn"
selected=
"selected"
>
core.chinacloudapi.cn
</option>
...
@@ -129,6 +132,13 @@
...
@@ -129,6 +132,13 @@
<label
class=
"col-md-2 control-label"
for=
"id_region"
>
{% trans "Region" %}
</label>
<label
class=
"col-md-2 control-label"
for=
"id_region"
>
{% trans "Region" %}
</label>
<div
class=
"col-md-9"
>
<div
class=
"col-md-9"
>
<input
id=
"id_region"
class=
"form-control"
type=
"text"
name=
"REGION"
value=
""
placeholder=
""
>
<input
id=
"id_region"
class=
"form-control"
type=
"text"
name=
"REGION"
value=
""
placeholder=
""
>
<div
class=
"help-block"
>
<span
class=
"s3"
>
北京: cn-north-1
宁夏: cn-northwest-1
<a
href=
"https://docs.aws.amazon.com/zh_cn/general/latest/gr/rande.html"
>
更多
</a>
</span>
</div>
</div>
</div>
</div>
</div>
...
@@ -166,7 +176,6 @@ function hiddenField(field){
...
@@ -166,7 +176,6 @@ function hiddenField(field){
}
}
function
getFieldByType
(
type
){
function
getFieldByType
(
type
){
if
(
type
===
'server'
){
if
(
type
===
'server'
){
return
need_get_field_of_server
return
need_get_field_of_server
}
}
...
@@ -211,15 +220,17 @@ $(document).ready(function() {
...
@@ -211,15 +220,17 @@ $(document).ready(function() {
field_of_all
=
[
name_id
,
host_id
,
port_id
,
bucket_id
,
access_key_id
,
secret_key_id
,
container_name_id
,
account_name_id
,
account_key_id
,
endpoint_id
,
endpoint_suffix_id
,
region_id
];
field_of_all
=
[
name_id
,
host_id
,
port_id
,
bucket_id
,
access_key_id
,
secret_key_id
,
container_name_id
,
account_name_id
,
account_key_id
,
endpoint_id
,
endpoint_suffix_id
,
region_id
];
need_get_field_of_server
=
[
name_id
];
need_get_field_of_server
=
[
name_id
];
need_get_field_of_s3
=
[
name_id
,
bucket_id
,
access_key_id
,
secret_key_id
,
region_id
];
need_get_field_of_s3
=
[
name_id
,
bucket_id
,
access_key_id
,
secret_key_id
,
region_id
,
endpoint_id
];
need_get_field_of_oss
=
[
name_id
,
bucket_id
,
access_key_id
,
secret_key_id
,
endpoint_id
];
need_get_field_of_oss
=
[
name_id
,
bucket_id
,
access_key_id
,
secret_key_id
,
endpoint_id
];
need_get_field_of_azure
=
[
name_id
,
container_name_id
,
account_name_id
,
account_key_id
,
endpoint_suffix_id
];
need_get_field_of_azure
=
[
name_id
,
container_name_id
,
account_name_id
,
account_key_id
,
endpoint_suffix_id
];
need_get_field_of_ceph
=
[
name_id
,
host_id
,
port_id
,
bucket_id
,
access_key_id
,
secret_key_id
,
region_id
];
need_get_field_of_ceph
=
[
name_id
,
host_id
,
port_id
,
bucket_id
,
access_key_id
,
secret_key_id
,
region_id
];
})
})
.
on
(
'change'
,
'.selector'
,
function
(){
.
on
(
'change'
,
'.selector'
,
function
(){
var
type
=
$
(
'.selector'
).
val
();
var
type
=
$
(
'.selector'
).
val
();
console
.
log
(
type
);
$
(
"."
+
type
).
show
(
);
hiddenField
(
field_of_all
);
hiddenField
(
field_of_all
);
$
(
'.help-block'
).
children
().
hide
();
$
(
'.help-block '
+
'.'
+
type
).
show
();
var
field
=
getFieldByType
(
type
);
var
field
=
getFieldByType
(
type
);
showField
(
field
)
showField
(
field
)
})
})
...
...
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