Minor fixes

This commit is contained in:
Jose Gonzalez 2023-03-06 10:35:34 +01:00
parent c13b77aea9
commit c48ec28743
3 changed files with 25 additions and 19 deletions

View File

@ -250,7 +250,7 @@ if ($favorite_array == false) {
echo "<a href='".$url."' title='Visual console".$favourite_v['name']."' alt='".$favourite_v['name']."'><li>"; echo "<a href='".$url."' title='Visual console".$favourite_v['name']."' alt='".$favourite_v['name']."'><li>";
echo "<div class='icon_img'>"; echo "<div class='icon_img'>";
echo html_print_image( echo html_print_image(
'images/'.groups_get_icon($favourite_v['id_group']).'.png', 'images/'.groups_get_icon($favourite_v['id_group']),
true, true,
['style' => ''] ['style' => '']
); );

View File

@ -3298,6 +3298,7 @@ class NetworkMap
$table = new stdClass(); $table = new stdClass();
$table->id = 'interface_link_table'; $table->id = 'interface_link_table';
$table->class = 'info_table';
$table->width = '100%'; $table->width = '100%';
$table->head['node_source_interface'] = __('Node source'); $table->head['node_source_interface'] = __('Node source');
$table->head['interface_source_select'] = __('Interface source'); $table->head['interface_source_select'] = __('Interface source');
@ -3340,16 +3341,25 @@ class NetworkMap
$output .= '<br>'; $output .= '<br>';
$table->data['interface_row']['interface_link_button'] = html_print_button( $output .= html_print_table($table, true);
__('Add interface link'), $output .= html_print_div(
'', [
false, 'class' => 'action-buttons',
'add_interface_link_js();', 'content' => html_print_button(
'class="sub"', __('Add interface link'),
'',
false,
'add_interface_link_js();',
[
'icon' => 'wand',
'mode' => 'mini',
],
true
),
],
true true
); );
$output .= html_print_table($table, true);
$output .= '</div></div>'; $output .= '</div></div>';
$output .= '<div id="dialog_node_add" class="invisible" title="'; $output .= '<div id="dialog_node_add" class="invisible" title="';
@ -3722,11 +3732,7 @@ class NetworkMap
// Open networkconsole_id div. // Open networkconsole_id div.
$output .= '<div id="networkconsole_'.$networkmap['id'].'"'; $output .= '<div id="networkconsole_'.$networkmap['id'].'"';
if ($this->fullSize) { if ($this->fullSize) {
if ($this->widget) { $output .= ' class="networkconsole">';
$output .= ' class="networkconsole">';
} else {
$output .= ' class="networkconsole">';
}
} else { } else {
$output .= ' style="width: '.$this->mapOptions['width'].'px; height: '.$this->mapOptions['height'].'px;position: relative; overflow: hidden; background: #FAFAFA">'; $output .= ' style="width: '.$this->mapOptions['width'].'px; height: '.$this->mapOptions['height'].'px;position: relative; overflow: hidden; background: #FAFAFA">';
} }

View File

@ -440,17 +440,17 @@ function groups_give_disabled_group($id_group)
*/ */
function groups_get_icon($id_group) function groups_get_icon($id_group)
{ {
if ($id_group == 0) { if ((int) $id_group === 0) {
return 'world'; $icon = 'unknown@groups.svg';
} else { } else {
$icon = (string) db_get_value('icon', 'tgrupo', 'id_grupo', (int) $id_group); $icon = (string) db_get_value('icon', 'tgrupo', 'id_grupo', (int) $id_group);
if ($icon == '') { if (empty($icon) === true) {
$icon = 'without_group'; $icon = 'unknown@groups.svg';
} }
return $icon;
} }
return $icon;
} }