mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-16 23:38:36 +00:00
[Update] 更新replay storage 配置
This commit is contained in:
@@ -223,7 +223,7 @@ $(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];
|
||||
need_get_field_of_server = [name_id];
|
||||
need_get_field_of_s3 = [name_id, bucket_id, access_key_id, secret_key_id, region_id, endpoint_id];
|
||||
need_get_field_of_s3 = [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_ceph = [name_id, host_id, port_id, bucket_id, access_key_id, secret_key_id, region_id];
|
||||
@@ -239,6 +239,11 @@ $(document).ready(function() {
|
||||
})
|
||||
|
||||
.on('click', '#id_submit_button', function(){
|
||||
$('#id_error').html('');
|
||||
var submitBtn = $("#id_submit_button");
|
||||
var origin_text = submitBtn.html();
|
||||
submitBtn.addClass('disabled');
|
||||
submitBtn.html("{% trans 'Submitting' %}");
|
||||
var type = $('.selector').val();
|
||||
var field = getFieldByType(type);
|
||||
var data = {'TYPE': type};
|
||||
@@ -249,13 +254,16 @@ $(document).ready(function() {
|
||||
var url = "{% url 'api-common:replay-storage-create' %}";
|
||||
var success = function(data, textStatus) {
|
||||
location = "{% url 'common:terminal-setting' %}";
|
||||
submitBtn.removeClass('disabled');
|
||||
submitBtn.html(origin_text);
|
||||
};
|
||||
var error = function(data, textStatus) {
|
||||
var error_msg = data.responseJSON.error;
|
||||
$('#id_error').html(error_msg)
|
||||
$('#id_error').html(error_msg);
|
||||
submitBtn.removeClass('disabled');
|
||||
submitBtn.html(origin_text);
|
||||
};
|
||||
ajaxAPI(url, JSON.stringify(data), success, error)
|
||||
|
||||
ajaxAPI(url, JSON.stringify(data), success, error);
|
||||
})
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
Reference in New Issue
Block a user