mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-30 01:05:39 +02:00
#9348 improved usability
This commit is contained in:
parent
4d7329f1fd
commit
6cf8fdad39
@ -3066,8 +3066,8 @@ class NetworkMap
|
|||||||
$table->data['template_row']['node_target'] = '';
|
$table->data['template_row']['node_target'] = '';
|
||||||
$table->data['template_row']['edit'] = '';
|
$table->data['template_row']['edit'] = '';
|
||||||
|
|
||||||
$table->data['template_row']['edit'] .= '<span class="edit_icon_correct" style="display: none">'.html_print_image('images/dot_green.png', true).'</span><span class="edit_icon_fail" style="display: none" >'.html_print_image('images/dot_red.png', true).'</span><span class="edit_icon_progress" style="display: none">'.html_print_image('images/spinner.gif', true).'</span><span class="edit_icon"><a class="edit_icon_link" title="'.__('Update').'" href="#">'.html_print_image('images/config.png', true, ['class' => 'invert_filter']).'</a></span>';
|
$table->data['template_row']['edit'] .= '<span class="edit_icon_correct" style="display: none">'.html_print_image('images/dot_green.png', true).'</span><span class="edit_icon_fail" style="display: none" >'.html_print_image('images/dot_red.png', true).'</span><span class="edit_icon_progress" style="display: none">'.html_print_image('images/spinner.gif', true).'</span>';
|
||||||
|
// <span class="edit_icon"><a class="edit_icon_link" title="'.__('Update').'" href="#">'.html_print_image('images/config.png', true, ['class' => 'invert_filter']).'</a></span>';
|
||||||
$table->data['template_row']['edit'] .= '<a class="delete_icon" href="#">'.html_print_image('images/delete.png', true, ['class' => 'invert_filter']).'</a>';
|
$table->data['template_row']['edit'] .= '<a class="delete_icon" href="#">'.html_print_image('images/delete.png', true, ['class' => 'invert_filter']).'</a>';
|
||||||
|
|
||||||
$table->colspan['no_relations']['0'] = 5;
|
$table->colspan['no_relations']['0'] = 5;
|
||||||
|
@ -597,6 +597,8 @@ function update_link(row_index, id_link) {
|
|||||||
$(".edit_icon_progress_" + row_index).css("display", "");
|
$(".edit_icon_progress_" + row_index).css("display", "");
|
||||||
$(".edit_icon_" + row_index).css("display", "none");
|
$(".edit_icon_" + row_index).css("display", "none");
|
||||||
|
|
||||||
|
$(".edit_icon_" + row_index).css("display", "none");
|
||||||
|
|
||||||
var params = [];
|
var params = [];
|
||||||
params.push("update_link=1");
|
params.push("update_link=1");
|
||||||
params.push("networkmap_id=" + networkmap_id);
|
params.push("networkmap_id=" + networkmap_id);
|
||||||
@ -978,6 +980,7 @@ function get_interface_data_to_table(node_selected, selected_links) {
|
|||||||
function load_interfaces(selected_links) {
|
function load_interfaces(selected_links) {
|
||||||
//Clean
|
//Clean
|
||||||
$("#relations_table .relation_link_row").remove();
|
$("#relations_table .relation_link_row").remove();
|
||||||
|
$("#update_relations_button").remove();
|
||||||
//Show the no relations
|
//Show the no relations
|
||||||
$("#relations_table-loading").css("display", "none");
|
$("#relations_table-loading").css("display", "none");
|
||||||
$("#relations_table-no_relations").css("display", "");
|
$("#relations_table-no_relations").css("display", "");
|
||||||
@ -1011,11 +1014,6 @@ function load_interfaces(selected_links) {
|
|||||||
"class",
|
"class",
|
||||||
"edit_icon_fail_" + i
|
"edit_icon_fail_" + i
|
||||||
);
|
);
|
||||||
$(".edit_icon_link", template_relation_row)
|
|
||||||
.attr("class", "edit_icon_link_" + i)
|
|
||||||
.click(function() {
|
|
||||||
update_link(i, link_each.id_db);
|
|
||||||
});
|
|
||||||
|
|
||||||
var params3 = [];
|
var params3 = [];
|
||||||
params3.push("get_intefaces=1");
|
params3.push("get_intefaces=1");
|
||||||
@ -1115,6 +1113,11 @@ function load_interfaces(selected_links) {
|
|||||||
"align",
|
"align",
|
||||||
"center"
|
"center"
|
||||||
);
|
);
|
||||||
|
$("#relations_table-template_row-edit", template_relation_row).css({
|
||||||
|
display: "flex",
|
||||||
|
"align-items": "center",
|
||||||
|
"justify-content": "center"
|
||||||
|
});
|
||||||
$(
|
$(
|
||||||
"#relations_table-template_row-edit .delete_icon",
|
"#relations_table-template_row-edit .delete_icon",
|
||||||
template_relation_row
|
template_relation_row
|
||||||
@ -1143,6 +1146,20 @@ function load_interfaces(selected_links) {
|
|||||||
|
|
||||||
template_relation_row = null;
|
template_relation_row = null;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$("#relations_table")
|
||||||
|
.parent()
|
||||||
|
.append(
|
||||||
|
`<div class='action-buttons w100p'>
|
||||||
|
<input id='update_relations_button' class='sub upd' type='button' value='update relations'>
|
||||||
|
</div>`
|
||||||
|
);
|
||||||
|
|
||||||
|
$("#update_relations_button").click(function() {
|
||||||
|
jQuery.each(selected_links, function(i, link_each) {
|
||||||
|
update_link(i, link_each.id_db);
|
||||||
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function add_node() {
|
function add_node() {
|
||||||
@ -1327,11 +1344,6 @@ function function_close_minimap() {
|
|||||||
function delete_nodes() {
|
function delete_nodes() {
|
||||||
var selection = d3.selectAll(".node_selected");
|
var selection = d3.selectAll(".node_selected");
|
||||||
selection.each(function(d) {
|
selection.each(function(d) {
|
||||||
//Avoid to delete pandora node center
|
|
||||||
if (d.id_agent == 0) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
var params = [];
|
var params = [];
|
||||||
params.push("id=" + d.id_db);
|
params.push("id=" + d.id_db);
|
||||||
params.push("delete_node=1");
|
params.push("delete_node=1");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user