Merge branch 'ent-6852-integrar-edicion-de-sistema-de-credencial-boxes-con-edicion-de-coniguracion-del-satelite-en-la-misma-vista' into 'develop'
Ent 6852 integrar edicion de sistema de credencial boxes con edicion de coniguracion del satelite en la misma vista See merge request artica/pandorafms!3758
This commit is contained in:
commit
0082e818a0
|
@ -97,6 +97,13 @@ if (isset($_GET['server'])) {
|
|||
echo '<div class="action-buttons w100p">';
|
||||
echo '<input type="submit" class="sub upd" value="'.__('Update').'">';
|
||||
echo '</div>';
|
||||
echo '</form>';
|
||||
|
||||
if ($row['server_type'] == 13) {
|
||||
echo '<div style="margin-top: 20px;">';
|
||||
ui_toggle($content, __('Credential boxes'), '', 'toggle_credential', false);
|
||||
echo '</div>';
|
||||
}
|
||||
} else if (isset($_GET['server_remote'])) {
|
||||
// Headers.
|
||||
$id_server = get_parameter_get('server_remote');
|
||||
|
@ -224,11 +231,148 @@ if (isset($_GET['server'])) {
|
|||
<script language="javascript" type="text/javascript">
|
||||
|
||||
$(document).ready (function () {
|
||||
var id_server = <?php echo $id_server; ?>;
|
||||
var server_type = <?php echo $row['server_type']; ?>;
|
||||
$("#check_exec_server img").on("click", function () {
|
||||
$("#check_exec_server img").attr("src", "images/spinner.gif");
|
||||
|
||||
check_process("<?php echo $id_server; ?>");
|
||||
check_process(id_server);
|
||||
});
|
||||
|
||||
if (server_type == 13) {
|
||||
load_credential_boxes();
|
||||
}
|
||||
|
||||
function load_credential_boxes () {
|
||||
var parameters = {};
|
||||
parameters['page'] = 'enterprise/include/ajax/servers.ajax';
|
||||
parameters['load_credential_boxes'] = 1;
|
||||
parameters['id_server'] = id_server;
|
||||
parameters['server_name'] = "<?php echo $row['name']; ?>";
|
||||
|
||||
jQuery.get(
|
||||
"ajax.php",
|
||||
parameters,
|
||||
function (data) {
|
||||
$(".white-box-content").html(data);
|
||||
|
||||
$("#submit-add").click(function (e) {
|
||||
add_credential_boxes();
|
||||
});
|
||||
|
||||
$("[id^=delete-]").click(function (e) {
|
||||
delete_credential_boxes(e.currentTarget.id);
|
||||
});
|
||||
|
||||
$("[id^=update-]").click(function (e) {
|
||||
load_update_credential_boxes(e.currentTarget.id);
|
||||
});
|
||||
},
|
||||
"html"
|
||||
);
|
||||
}
|
||||
|
||||
function add_credential_boxes () {
|
||||
$(".white-box-content").html('');
|
||||
var parameters2 = {};
|
||||
parameters2['page'] = 'enterprise/include/ajax/servers.ajax';
|
||||
parameters2['add_credential_boxes'] = 1;
|
||||
|
||||
jQuery.get(
|
||||
"ajax.php",
|
||||
parameters2,
|
||||
function (data2) {
|
||||
$(".white-box-content").html(data2);
|
||||
|
||||
// Insert credential
|
||||
$("#submit-add").click(function (e) {
|
||||
save_credential_boxes();
|
||||
})
|
||||
},
|
||||
"html"
|
||||
);
|
||||
}
|
||||
|
||||
function save_credential_boxes () {
|
||||
var parameters3 = {};
|
||||
parameters3['page'] = 'enterprise/include/ajax/servers.ajax';
|
||||
parameters3['save_credential_boxes'] = 1;
|
||||
parameters3['subnet'] = $("#text-subnet").val();
|
||||
parameters3['name'] = $("#text-name").val();
|
||||
parameters3['pass'] = $("#password-pass").val();
|
||||
parameters3['server_name'] = "<?php echo $row['name']; ?>";
|
||||
|
||||
|
||||
jQuery.post(
|
||||
"ajax.php",
|
||||
parameters3,
|
||||
function (data3) {
|
||||
$(".white-box-content").html('');
|
||||
load_credential_boxes();
|
||||
},
|
||||
"html"
|
||||
);
|
||||
}
|
||||
|
||||
function delete_credential_boxes (datas) {
|
||||
var parameters = {};
|
||||
parameters['page'] = 'enterprise/include/ajax/servers.ajax';
|
||||
parameters['delete_credential_boxes'] = 1;
|
||||
parameters['server_name'] = "<?php echo $row['name']; ?>";
|
||||
parameters['datas'] = datas;
|
||||
|
||||
jQuery.post(
|
||||
"ajax.php",
|
||||
parameters,
|
||||
function (data) {
|
||||
$(".white-box-content").html('');
|
||||
load_credential_boxes();
|
||||
},
|
||||
"html"
|
||||
);
|
||||
}
|
||||
|
||||
function load_update_credential_boxes (datas) {
|
||||
var parameters = {};
|
||||
parameters['page'] = 'enterprise/include/ajax/servers.ajax';
|
||||
parameters['load_update_credential_boxes'] = 1;
|
||||
parameters['datas'] = datas;
|
||||
|
||||
jQuery.get(
|
||||
"ajax.php",
|
||||
parameters,
|
||||
function (data) {
|
||||
$(".white-box-content").html(data);
|
||||
|
||||
$("#submit-update").click(function (e) {
|
||||
update_credential_boxes(datas);
|
||||
});
|
||||
},
|
||||
"html"
|
||||
);
|
||||
}
|
||||
|
||||
function update_credential_boxes(datas) {
|
||||
var parameters = {};
|
||||
parameters['page'] = 'enterprise/include/ajax/servers.ajax';
|
||||
parameters['update_credential_boxes'] = 1;
|
||||
parameters['subnet'] = $("#text-subnet").val();
|
||||
parameters['name'] = $("#text-name").val();
|
||||
parameters['pass'] = $("#password-pass").val();
|
||||
parameters['server_name'] = "<?php echo $row['name']; ?>";
|
||||
parameters['old_datas'] = datas;
|
||||
|
||||
jQuery.post(
|
||||
"ajax.php",
|
||||
parameters,
|
||||
function (data) {
|
||||
$(".white-box-content").html('');
|
||||
load_credential_boxes();
|
||||
},
|
||||
"html"
|
||||
);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
function check_process (id_server) {
|
||||
|
|
Loading…
Reference in New Issue