";
echo html_print_image(
- 'images/'.groups_get_icon($favourite_v['id_group']).'.png',
+ 'images/'.groups_get_icon($favourite_v['id_group']),
true,
['style' => '']
);
diff --git a/pandora_console/godmode/servers/discovery.php b/pandora_console/godmode/servers/discovery.php
index 5ae4f2fcfd..3df3342f52 100755
--- a/pandora_console/godmode/servers/discovery.php
+++ b/pandora_console/godmode/servers/discovery.php
@@ -55,17 +55,19 @@ function get_wiz_class($str)
default:
// Main, show header.
- ui_print_page_header(
+ ui_print_standard_header(
__('Discovery'),
'',
false,
'',
true,
- '',
- false,
- '',
- GENERIC_SIZE_TEXT,
- ''
+ [],
+ [
+ [
+ 'link' => '',
+ 'label' => __('Discovery'),
+ ],
+ ]
);
return null;
}
diff --git a/pandora_console/godmode/servers/plugin.php b/pandora_console/godmode/servers/plugin.php
index d931f5268b..43fad7d3be 100644
--- a/pandora_console/godmode/servers/plugin.php
+++ b/pandora_console/godmode/servers/plugin.php
@@ -454,22 +454,6 @@ if (empty($create) === false || empty($view) === false) {
$data[0] = html_print_textarea('form_description', 4, 50, $form_description, '', true, 'w100p');
$table->colspan['plugin_desc_inputs'][0] = 3;
$table->data['plugin_desc_inputs'] = $data;
- /*
- if (is_metaconsole() === true) {
- $table->head[0] = __('General');
- $table->head_colspan[0] = 4;
- $table->headstyle[0] = 'text-align: center';
- html_print_table($table);
- } else {
- echo '
';
- }
-
- html_print_table($table);
-
- $table->data = [];
- */
// Command title.
$commandTitleContent = [];
@@ -528,20 +512,6 @@ if (empty($create) === false || empty($view) === false) {
$data[0] = html_print_div(['id' => 'command_preview', 'class' => 'mono'], true);
$table->data['plugin_preview_inputs'] = $data;
$table->colspan['plugin_preview_inputs'][0] = 2;
- /*
- $table->width = '100%';
- $table->class = 'databox filters';
- if (is_metaconsole() === true) {
- $table->head[0] = __('Command');
- $table->head_colspan[0] = 4;
- $table->headstyle[0] = 'text-align: center';
- html_print_table($table);
- } else {
- echo '
';
- }
- */
// Parameters macros title.
$macrosTitleContent = [];
@@ -696,11 +666,27 @@ if (empty($create) === false || empty($view) === false) {
echo '
';
if ($create != '') {
- echo "";
+ $button = html_print_submit_button(
+ __('Create'),
+ 'crtbutton',
+ false,
+ [ 'icon' => 'wand' ],
+ true
+ );
} else {
- echo "";
+ $button = html_print_submit_button(
+ __('Update'),
+ 'uptbutton',
+ false,
+ [ 'icon' => 'upd' ],
+ true
+ );
}
+ html_print_action_buttons(
+ $button
+ );
+
echo '';
if (defined('METACONSOLE')) {
diff --git a/pandora_console/godmode/servers/plugin_registration.php b/pandora_console/godmode/servers/plugin_registration.php
index 7e669579c9..296a29a510 100644
--- a/pandora_console/godmode/servers/plugin_registration.php
+++ b/pandora_console/godmode/servers/plugin_registration.php
@@ -60,12 +60,23 @@ if (is_metaconsole() === true) {
return;
}
} else {
- ui_print_page_header(
+ ui_print_standard_header(
__('PLUGIN REGISTRATION'),
'images/gm_servers.png',
false,
'',
- true
+ true,
+ [],
+ [
+ [
+ 'link' => '',
+ 'label' => __('Servers'),
+ ],
+ [
+ 'link' => '',
+ 'label' => __('Register plugin'),
+ ],
+ ]
);
$management_allowed = is_management_allowed();
diff --git a/pandora_console/godmode/wizards/DiscoveryTaskList.class.php b/pandora_console/godmode/wizards/DiscoveryTaskList.class.php
index b942bba283..9372ffe144 100644
--- a/pandora_console/godmode/wizards/DiscoveryTaskList.class.php
+++ b/pandora_console/godmode/wizards/DiscoveryTaskList.class.php
@@ -175,6 +175,7 @@ class DiscoveryTaskList extends HTML
'action' => ui_get_full_url(
'index.php?sec=gservers&sec2=godmode/servers/discovery'
),
+ 'class' => 'flex_center',
],
'inputs' => [
[
@@ -182,25 +183,27 @@ class DiscoveryTaskList extends HTML
'name' => 'submit',
'label' => __('Go back'),
'type' => 'submit',
- 'attributes' => [ 'icon' => 'cancel' ],
+ 'attributes' => [
+ 'icon' => 'back',
+ 'mode' => 'secondary',
+ ],
'return' => true,
],
],
[
- 'class' => 'action-buttons rule-builder-actions',
'arguments' => [
'name' => 'refresh',
'label' => __('Refresh'),
'type' => 'button',
'attributes' => [ 'icon' => 'cog'],
'return' => true,
- 'script' => 'location.href = \''.$this->url.'\';',
+ 'script' => 'location.href = "'.$this->url.'";',
],
],
],
];
- $this->printForm($form);
+ html_print_action_buttons($this->printForm($form, true));
}
return $ret;
diff --git a/pandora_console/godmode/wizards/HostDevices.class.php b/pandora_console/godmode/wizards/HostDevices.class.php
index 7d9e9acf8c..2f7c5cd692 100755
--- a/pandora_console/godmode/wizards/HostDevices.class.php
+++ b/pandora_console/godmode/wizards/HostDevices.class.php
@@ -635,6 +635,7 @@ class HostDevices extends Wizard
'form' => [
'method' => 'POST',
'action' => $this->url.'&mode=netscan&page='.($this->page - 1).'&task='.$this->task['id_rt'],
+ 'class' => 'flex_center',
],
'inputs' => [
[
@@ -649,7 +650,10 @@ class HostDevices extends Wizard
'name' => 'submit',
'label' => __('Go back'),
'type' => 'submit',
- 'attributes' => ['icon' => 'cancel'],
+ 'attributes' => [
+ 'icon' => 'back',
+ 'mode' => 'secondary',
+ ],
'return' => true,
],
],
@@ -667,7 +671,7 @@ class HostDevices extends Wizard
$form['form']['action'] = $this->url.'&mode=netscan&page='.($this->page - 1);
}
- $this->printForm($form);
+ html_print_action_buttons($this->printForm($form, true));
return null;
}
@@ -734,6 +738,7 @@ class HostDevices extends Wizard
'form' => [
'method' => 'POST',
'action' => $this->url.'&mode=netscan&page=0',
+ 'class' => 'flex_center',
],
'inputs' => [
[
@@ -748,14 +753,17 @@ class HostDevices extends Wizard
'name' => 'submit',
'label' => __('Go back'),
'type' => 'submit',
- 'attributes' => ['icon' => 'cancel'],
+ 'attributes' => [
+ 'icon' => 'back',
+ 'mode' => 'secondary',
+ ],
'return' => true,
],
],
],
];
- $this->printForm($form);
+ html_print_action_buttons($this->printForm($form, true));
return null;
}
@@ -786,15 +794,6 @@ class HostDevices extends Wizard
'width' => '30%',
'style' => 'padding: 9px;min-width: 250px;',
'inputs' => [
- '0' => [
- 'arguments' => [
- 'name' => 'submit',
- 'label' => $str,
- 'type' => 'submit',
- 'attributes' => 'class="sub next"',
- 'return' => true,
- ],
- ],
'1' => ' '.html_print_image('images/wizard/netscan_green.png', true, ['title' => __('Close')], false).' ',
'2' => [
'label' => ''.__('Interval').':'.ui_print_help_tip(
@@ -982,6 +981,7 @@ class HostDevices extends Wizard
'method' => 'POST',
'enctype' => 'multipart/form-data',
'action' => $this->url.'&mode=netscan&page='.($this->page + 1).$task_url,
+ 'id' => 'form-netscan-definition',
];
// Default.
@@ -1021,7 +1021,24 @@ class HostDevices extends Wizard
';
$this->printFormAsGrid($form);
- $this->printGoBackButton($this->url.'&page='.($this->page - 1));
+
+ $output_form = $this->printInput(
+ [
+ 'name' => 'submit',
+ 'label' => $str,
+ 'type' => 'submit',
+ 'attributes' => [
+ 'icon' => 'next',
+ 'form' => 'form-netscan-definition',
+ ],
+ 'return' => true,
+ 'width' => 'initial',
+ ]
+ );
+
+ $output_form .= $this->printGoBackButton($this->url.'&page='.($this->page - 1), true);
+
+ html_print_action_buttons($output_form);
}
}
@@ -1586,24 +1603,31 @@ class HostDevices extends Wizard
}
}
- // Submit button.
- $form['inputs'][] = [
- 'arguments' => [
- 'name' => 'submit-finish',
- 'label' => __('Finish'),
- 'type' => 'submit',
- 'attributes' => 'class="sub next"',
- 'return' => true,
- ],
- ];
-
$form['form'] = [
'method' => 'POST',
'action' => $this->url.'&mode=netscan&page='.($this->page + 1).'&task='.$this->task['id_rt'],
+ 'id' => 'form-netscan-feature',
];
$this->printFormAsList($form);
- $this->printGoBackButton($this->url.'&mode=netscan&task='.$this->task['id_rt'].'&page='.($this->page - 1));
+
+ $output_form = $this->printInput(
+ [
+ 'name' => 'submit-finish',
+ 'label' => __('Finish'),
+ 'type' => 'submit',
+ 'attributes' => [
+ 'icon' => 'next',
+ 'form' => 'form-netscan-feature',
+ ],
+ 'return' => true,
+ 'width' => 'initial',
+ ]
+ );
+
+ $output_form .= $this->printGoBackButton($this->url.'&mode=netscan&task='.$this->task['id_rt'].'&page='.($this->page - 1), true);
+
+ html_print_action_buttons($output_form);
}
if ($this->page == 2) {
diff --git a/pandora_console/godmode/wizards/Wizard.main.php b/pandora_console/godmode/wizards/Wizard.main.php
index 22521c0af0..4cfcbe7056 100644
--- a/pandora_console/godmode/wizards/Wizard.main.php
+++ b/pandora_console/godmode/wizards/Wizard.main.php
@@ -395,7 +395,7 @@ class Wizard
*
* @return void
*/
- public function printGoBackButton($url=null)
+ public function printGoBackButton($url=null, $return=false)
{
if (isset($url) === false) {
$url = ui_get_full_url(
@@ -415,14 +415,21 @@ class Wizard
'name' => 'submit',
'label' => __('Go back'),
'type' => 'submit',
- 'attributes' => ['icon' => 'cancel'],
+ 'attributes' => [
+ 'icon' => 'back',
+ 'mode' => 'secondary',
+ ],
'return' => true,
],
],
],
];
- $this->printForm($form);
+ if ($return === true) {
+ return $this->printForm($form, $return);
+ }
+
+ $this->printForm($form, $return);
}
diff --git a/pandora_console/images/networkmap/HP@os.svg b/pandora_console/images/networkmap/HP@os.svg
new file mode 100644
index 0000000000..03173da459
--- /dev/null
+++ b/pandora_console/images/networkmap/HP@os.svg
@@ -0,0 +1,9 @@
+
+
\ No newline at end of file
diff --git a/pandora_console/images/networkmap/aix@os.svg b/pandora_console/images/networkmap/aix@os.svg
new file mode 100644
index 0000000000..2e3dae7c33
--- /dev/null
+++ b/pandora_console/images/networkmap/aix@os.svg
@@ -0,0 +1,9 @@
+
+
\ No newline at end of file
diff --git a/pandora_console/images/networkmap/android@os.svg b/pandora_console/images/networkmap/android@os.svg
new file mode 100644
index 0000000000..f7b100b697
--- /dev/null
+++ b/pandora_console/images/networkmap/android@os.svg
@@ -0,0 +1,9 @@
+
+
\ No newline at end of file
diff --git a/pandora_console/images/networkmap/apple@os.svg b/pandora_console/images/networkmap/apple@os.svg
new file mode 100644
index 0000000000..2924d1bbba
--- /dev/null
+++ b/pandora_console/images/networkmap/apple@os.svg
@@ -0,0 +1,9 @@
+
+
\ No newline at end of file
diff --git a/pandora_console/images/networkmap/cisco@os.svg b/pandora_console/images/networkmap/cisco@os.svg
new file mode 100644
index 0000000000..488432fc32
--- /dev/null
+++ b/pandora_console/images/networkmap/cisco@os.svg
@@ -0,0 +1,9 @@
+
+
\ No newline at end of file
diff --git a/pandora_console/images/networkmap/cluster@os.svg b/pandora_console/images/networkmap/cluster@os.svg
new file mode 100644
index 0000000000..5560537ab9
--- /dev/null
+++ b/pandora_console/images/networkmap/cluster@os.svg
@@ -0,0 +1,9 @@
+
+
\ No newline at end of file
diff --git a/pandora_console/images/networkmap/embedded@os.svg b/pandora_console/images/networkmap/embedded@os.svg
new file mode 100644
index 0000000000..c73d953548
--- /dev/null
+++ b/pandora_console/images/networkmap/embedded@os.svg
@@ -0,0 +1,9 @@
+
+
\ No newline at end of file
diff --git a/pandora_console/images/networkmap/freebsd@os.svg b/pandora_console/images/networkmap/freebsd@os.svg
new file mode 100644
index 0000000000..effa9ded77
--- /dev/null
+++ b/pandora_console/images/networkmap/freebsd@os.svg
@@ -0,0 +1,9 @@
+
+
\ No newline at end of file
diff --git a/pandora_console/images/networkmap/linux@os.svg b/pandora_console/images/networkmap/linux@os.svg
new file mode 100644
index 0000000000..6de3c7ac76
--- /dev/null
+++ b/pandora_console/images/networkmap/linux@os.svg
@@ -0,0 +1,9 @@
+
+
\ No newline at end of file
diff --git a/pandora_console/images/networkmap/mainframe@os.svg b/pandora_console/images/networkmap/mainframe@os.svg
new file mode 100644
index 0000000000..0ff480167c
--- /dev/null
+++ b/pandora_console/images/networkmap/mainframe@os.svg
@@ -0,0 +1,9 @@
+
+
\ No newline at end of file
diff --git a/pandora_console/images/networkmap/network-server@os.svg b/pandora_console/images/networkmap/network-server@os.svg
new file mode 100644
index 0000000000..6bd340b987
--- /dev/null
+++ b/pandora_console/images/networkmap/network-server@os.svg
@@ -0,0 +1,9 @@
+
+
\ No newline at end of file
diff --git a/pandora_console/images/networkmap/other-OS@os.svg b/pandora_console/images/networkmap/other-OS@os.svg
new file mode 100644
index 0000000000..2bdffdbdd3
--- /dev/null
+++ b/pandora_console/images/networkmap/other-OS@os.svg
@@ -0,0 +1,9 @@
+
+
\ No newline at end of file
diff --git a/pandora_console/images/networkmap/routers@os.svg b/pandora_console/images/networkmap/routers@os.svg
new file mode 100644
index 0000000000..1ba7f611f4
--- /dev/null
+++ b/pandora_console/images/networkmap/routers@os.svg
@@ -0,0 +1,9 @@
+
+
\ No newline at end of file
diff --git a/pandora_console/images/networkmap/satellite@os.svg b/pandora_console/images/networkmap/satellite@os.svg
new file mode 100644
index 0000000000..a260dc0f6d
--- /dev/null
+++ b/pandora_console/images/networkmap/satellite@os.svg
@@ -0,0 +1,9 @@
+
+
\ No newline at end of file
diff --git a/pandora_console/images/networkmap/solaris@os.svg b/pandora_console/images/networkmap/solaris@os.svg
new file mode 100644
index 0000000000..de89b4123c
--- /dev/null
+++ b/pandora_console/images/networkmap/solaris@os.svg
@@ -0,0 +1,9 @@
+
+
\ No newline at end of file
diff --git a/pandora_console/images/networkmap/switch@os.svg b/pandora_console/images/networkmap/switch@os.svg
new file mode 100644
index 0000000000..63280d0a76
--- /dev/null
+++ b/pandora_console/images/networkmap/switch@os.svg
@@ -0,0 +1,9 @@
+
+
\ No newline at end of file
diff --git a/pandora_console/images/networkmap/vmware@os.svg b/pandora_console/images/networkmap/vmware@os.svg
new file mode 100644
index 0000000000..cdfcd0f047
--- /dev/null
+++ b/pandora_console/images/networkmap/vmware@os.svg
@@ -0,0 +1,9 @@
+
+
\ No newline at end of file
diff --git a/pandora_console/images/networkmap/windows@os.svg b/pandora_console/images/networkmap/windows@os.svg
new file mode 100644
index 0000000000..76c0ec7108
--- /dev/null
+++ b/pandora_console/images/networkmap/windows@os.svg
@@ -0,0 +1,9 @@
+
+
\ No newline at end of file
diff --git a/pandora_console/include/class/ConfigPEN.class.php b/pandora_console/include/class/ConfigPEN.class.php
index 6f6b93cd5a..03638df6f2 100644
--- a/pandora_console/include/class/ConfigPEN.class.php
+++ b/pandora_console/include/class/ConfigPEN.class.php
@@ -240,17 +240,17 @@ class ConfigPEN extends HTML
$tmp->description = io_safe_output($tmp->description);
$tmp->manufacturer = io_safe_output($tmp->manufacturer);
- $tmp->options = '';
+ $tmp->options = '';
+
$carry[] = $tmp;
return $carry;
}
@@ -406,7 +408,7 @@ class ConfigPEN extends HTML
'action' => '#',
'id' => 'modal_form',
'onsubmit' => 'return false;',
- 'class' => '',
+ 'class' => 'filter-list-adv',
];
$inputs = [];
@@ -420,7 +422,7 @@ class ConfigPEN extends HTML
'size' => 50,
];
- if ((bool) $values['pen']) {
+ if ((bool) $values['pen'] === true) {
$arguments['disabled'] = true;
}
@@ -599,18 +601,18 @@ class ConfigPEN extends HTML
__('Description'),
[
'text' => __('Options'),
- 'class' => 'table_action_buttons',
+ 'class' => 'table_action_buttons align_right',
],
];
- $this->tableId = 'keystore';
+ $tableId = 'keystore';
// Load datatables user interface.
$output .= ui_print_datatable(
[
- 'id' => $this->tableId,
+ 'id' => $tableId,
'return' => true,
'class' => 'info_table',
- 'style' => 'width: 100%',
+ 'style' => 'width: 99%',
'columns' => $columns,
'column_names' => $column_names,
'ajax_url' => $this->ajaxController,
@@ -621,6 +623,7 @@ class ConfigPEN extends HTML
'direction' => 'asc',
],
'search_button_class' => 'sub filter float-right',
+ 'filter_main_class' => 'box-flat white_table_graph fixed_filter_bar',
'form' => [
'inputs' => [
[
@@ -643,15 +646,18 @@ class ConfigPEN extends HTML
$output .= '';
$output .= '';
- // Create button.
- $output .= parent::printInput(
- [
- 'type' => 'submit',
- 'name' => 'create',
- 'label' => __('Register manufacturer'),
- 'attributes' => 'class="sub next"',
- 'return' => true,
- ]
+ $output .= html_print_action_buttons(
+ parent::printInput(
+ [
+ 'type' => 'submit',
+ 'name' => 'create',
+ 'label' => __('Register manufacturer'),
+ 'attributes' => ['icon' => 'next'],
+ 'return' => true,
+ ]
+ ),
+ ['type' => 'form_action'],
+ true
);
ob_start();
diff --git a/pandora_console/include/class/CustomNetScan.class.php b/pandora_console/include/class/CustomNetScan.class.php
index 6a73481ac3..d2d8cd4700 100644
--- a/pandora_console/include/class/CustomNetScan.class.php
+++ b/pandora_console/include/class/CustomNetScan.class.php
@@ -313,7 +313,10 @@ class CustomNetScan extends Wizard
'name' => 'submit',
'label' => __('Go back'),
'type' => 'submit',
- 'attributes' => ['icon' => 'cancel'],
+ 'attributes' => [
+ 'icon' => 'cancel',
+ 'mode' => 'secondary',
+ ],
'return' => true,
],
],
@@ -421,7 +424,10 @@ class CustomNetScan extends Wizard
'name' => 'submit',
'label' => __('Go back'),
'type' => 'submit',
- 'attributes' => ['icon' => 'cancel'],
+ 'attributes' => [
+ 'icon' => 'cancel',
+ 'mode' => 'secondary',
+ ],
'return' => true,
],
],
@@ -553,17 +559,6 @@ class CustomNetScan extends Wizard
$str = __('Update and continue');
}
- // Submit button.
- $form['inputs'][] = [
- 'arguments' => [
- 'name' => 'submit',
- 'label' => $str,
- 'type' => 'submit',
- 'attributes' => [ 'icon' => 'next' ],
- 'return' => true,
- ],
- ];
-
$task_url = '';
if (isset($this->task['id_rt'])) {
$task_url = '&task='.$this->task['id_rt'];
@@ -572,6 +567,7 @@ class CustomNetScan extends Wizard
$form['form'] = [
'method' => 'POST',
'action' => $this->url.'&mode=customnetscan&page='.($this->page + 1).$task_url,
+ 'id' => 'form-netscan-custom-definition',
];
// Default.
@@ -602,6 +598,22 @@ class CustomNetScan extends Wizard
// XXX: Could be improved validating inputs before continue (JS)
// Print NetScan page 0.
$this->printFormAsList($form);
+
+ html_print_action_buttons(
+ $this->printInput(
+ [
+ 'name' => 'submit',
+ 'label' => $str,
+ 'type' => 'submit',
+ 'attributes' => [
+ 'icon' => 'next',
+ 'form' => 'form-netscan-custom-definition',
+ ],
+ 'return' => true,
+ 'width' => 'initial',
+ ]
+ )
+ );
}
}
@@ -717,20 +729,10 @@ class CustomNetScan extends Wizard
}
}
- // Submit button.
- $form['inputs'][] = [
- 'arguments' => [
- 'name' => 'submit',
- 'label' => __('Finish'),
- 'type' => 'submit',
- 'attributes' => ['icon' => 'update'],
- 'return' => true,
- ],
- ];
-
$form['form'] = [
'method' => 'POST',
'action' => $this->url.'&mode=customnetscan&page='.($this->page + 1).'&task='.$this->task['id_rt'],
+ 'id' => 'form-netscan-custom-script',
];
$id_task = (isset($this->task['id_rt']) === true) ? $this->task['id_rt'] : 0;
@@ -748,6 +750,22 @@ class CustomNetScan extends Wizard
})'.$change;
$this->printFormAsList($form);
+
+ html_print_action_buttons(
+ $this->printInput(
+ [
+ 'name' => 'submit',
+ 'label' => __('Finish'),
+ 'type' => 'submit',
+ 'attributes' => [
+ 'icon' => 'update',
+ 'form' => 'form-netscan-custom-script',
+ ],
+ 'return' => true,
+ 'width' => 'initial',
+ ]
+ )
+ );
}
if (isset($this->page) === true && $this->page === 2) {
diff --git a/pandora_console/include/class/HTML.class.php b/pandora_console/include/class/HTML.class.php
index d3bf4f4f3d..a8f7c54985 100644
--- a/pandora_console/include/class/HTML.class.php
+++ b/pandora_console/include/class/HTML.class.php
@@ -398,7 +398,7 @@ class HTML
*
* @return void
*/
- public static function printGoBackButton($url=null)
+ public static function printGoBackButton($url=null, $return=false)
{
if (isset($url) === false) {
$url = ui_get_full_url(
@@ -418,14 +418,21 @@ class HTML
'name' => 'submit',
'label' => __('Go back'),
'type' => 'submit',
- 'attributes' => [ 'icon' => 'cancel' ],
+ 'attributes' => [
+ 'icon' => 'back',
+ 'mode' => 'secondary',
+ ],
'return' => true,
],
],
],
];
- self::printForm($form);
+ if ($return === true) {
+ return self::printForm($form, $return);
+ }
+
+ self::printForm($form, $return);
}
@@ -803,11 +810,13 @@ class HTML
$output_head .= 'id="'.$form['id'].'" ';
}
- $output_head .= 'class="max_floating_element_size " ';
+ $output_head .= 'class="max_floating_element_size ';
if (isset($form['class']) === true) {
- $output_head .= 'class="discovery '.$form['class'].'" ';
+ $output_head .= 'discovery '.$form['class'].' ';
}
+ $output_head .= '"';
+
if (isset($form['onsubmit']) === true) {
$output_head .= 'onsubmit="'.$form['onsubmit'].'" ';
}
@@ -1078,7 +1087,7 @@ class HTML
$cb_function = $data['cb_function'];
$cb_args = $data['cb_args'];
- $output_head = '';
@@ -527,7 +527,7 @@ class ManageNetScanScripts extends Wizard
$url .= '&wiz=hd&mode=managenetscanscripts';
if ($id_script !== 0) {
- echo '';
diff --git a/pandora_console/include/class/ModuleTemplates.class.php b/pandora_console/include/class/ModuleTemplates.class.php
index c1371afa81..fb1a496246 100644
--- a/pandora_console/include/class/ModuleTemplates.class.php
+++ b/pandora_console/include/class/ModuleTemplates.class.php
@@ -836,7 +836,15 @@ class ModuleTemplates extends HTML
]
);
- ui_pagination($countModuleTemplates, $this->baseUrl, $this->offset);
+ $tablePagination = ui_pagination(
+ $countModuleTemplates,
+ $this->baseUrl,
+ $this->offset,
+ 0,
+ true,
+ 'offset',
+ false
+ );
// Create the table with Module Block list.
$table = new StdClasS();
$table->class = 'databox data ';
@@ -874,13 +882,13 @@ class ModuleTemplates extends HTML
$table->cellclass[][3] = 'table_action_buttons';
$data[3] = html_print_input_image(
'delete_profile',
- 'images/cross.png',
+ 'images/delete.svg',
$row['id_np'],
- '',
+ 'width:40px',
true,
[
'onclick' => 'if (!confirm(\''.__('Are you sure?').'\')) return false;',
- 'class' => 'invert_filter',
+ 'class' => 'invert_filter main_menu_icon',
]
);
$data[3] .= html_print_input_image(
@@ -891,23 +899,40 @@ class ModuleTemplates extends HTML
true,
[
'title' => 'Export tdaso CSV',
- 'class' => 'invert_filter',
+ 'class' => 'invert_filter main_menu_icon',
]
);
- $data[3] = ''.html_print_image('images/cross.png', true, ['title' => __('Delete'), 'class' => 'invert_filter']).'';
- $data[3] .= ''.html_print_image('images/csv.png', true, ['title' => __('Export to CSV'), 'class' => 'invert_filter']).'';
+ $data[3] = '';
+ $data[3] .= html_print_image(
+ 'images/delete.svg',
+ true,
+ [
+ 'title' => __('Delete'),
+ 'class' => 'invert_filter main_menu_icon',
+ ]
+ );
+ $data[3] .= '';
+ $data[3] .= '';
+ $data[3] .= html_print_image(
+ 'images/csv.png',
+ true,
+ [
+ 'title' => __('Export to CSV'),
+ 'class' => 'invert_filter main_menu_icon',
+ ]
+ );
+ $data[3] .= '';
array_push($table->data, $data);
}
html_print_table($table);
- $output = '';
-
$form = [
'method' => 'POST',
'action' => $this->baseUrl,
'id' => 'main_management_form',
+ 'class' => 'flex_center',
];
$inputs[] = [
@@ -934,22 +959,29 @@ class ModuleTemplates extends HTML
'label' => __('Delete selected'),
'name' => 'erase',
'type' => 'button',
- 'attributes' => ['icon' => 'cancel'],
+ 'attributes' => [
+ 'icon' => 'delete',
+ 'mode' => 'secondary',
+ ],
'return' => true,
],
];
- $output .= $this->printForm(
+ html_print_action_buttons(
+ $this->printForm(
+ [
+ 'form' => $form,
+ 'inputs' => $inputs,
+ ],
+ true
+ ),
[
- 'form' => $form,
- 'inputs' => $inputs,
- ],
- true
+ 'type' => 'data_table',
+ 'class' => 'fixed_action_buttons',
+ 'right_content' => $tablePagination,
+ ]
);
- $output .= ' ';
-
- echo $output;
}
@@ -1056,42 +1088,38 @@ class ModuleTemplates extends HTML
],
];
- $availableButtons = [];
+ // Required for PEN field.
+ ui_require_jquery_file('tag-editor');
+ ui_require_css_file('jquery.tag-editor');
- $availableButtons[] = [
- 'arguments' => [
+ $buttons = $this->printInput(
+ [
'name' => 'action_button',
'label' => $formButtonLabel,
'type' => 'submit',
- 'attributes' => [ 'icon' => $formButtonClass ],
+ 'attributes' => [
+ 'icon' => $formButtonClass,
+ 'form' => 'module_template_form',
+ ],
'return' => true,
- ],
- ];
+ 'width' => 'initial',
+ ]
+ );
if ($createNewTemplate === false) {
- $availableButtons[] = [
- 'arguments' => [
+ $buttons .= $this->printInput(
+ [
'name' => 'add_components_button',
'label' => __('Add components'),
'type' => 'button',
'attributes' => [ 'icon' => 'cog' ],
'script' => 'showAddComponent();',
'return' => true,
- ],
- ];
+ 'width' => 'initial',
+ ]
+ );
}
- $inputs[] = [
- 'class' => 'action_button_list',
- 'direct' => false,
- 'wrapper' => 'div',
- 'block_content' => $availableButtons,
- ];
-
- // Required for PEN field.
- ui_require_jquery_file('tag-editor');
- ui_require_css_file('jquery.tag-editor');
-
if ($createNewTemplate === false) {
// Get the data.
$sql = sprintf(
@@ -1142,13 +1170,13 @@ class ModuleTemplates extends HTML
$blockTitle .= '';
$output .= '';
$output .= ' ';
- $table = new StdClass();
- $table->width = '100%';
- $table->data = [];
-
- $table->data[0][0] = __('Agent');
$params = [];
$params['return'] = true;
$params['show_helptip'] = true;
@@ -3369,29 +3352,48 @@ class NetworkMap
$params['print_hidden_input_idagent'] = true;
$params['hidden_input_idagent_name'] = 'id_agent';
$params['disabled_javascript_on_blur_function'] = true;
- $table->data[0][1] = ui_print_agent_autocomplete_input($params);
- $table->data[1][0] = '';
- $table->data[1][1] = html_print_button(
- __('Add agent node'),
- '',
- false,
- 'add_agent_node();',
- 'class="sub"',
- true
- ).html_print_image(
- 'images/error_red.png',
- true,
- [
- 'id' => 'error_red',
- 'style' => 'vertical-align: bottom;display: none;',
- 'class' => 'forced_title',
- 'alt' => '',
- 'data-title' => 'data-use_title_for_force_title:1',
- ],
- false
+
+ $table = new StdClass();
+ $table->width = '100%';
+ $table->id = 'add_agent_network_map';
+ $table->class = 'filter-table-adv';
+ $table->data = [];
+
+ $table->data[0][] = html_print_label_input_block(
+ __('Agent'),
+ ui_print_agent_autocomplete_input($params)
);
$add_agent_node_html = html_print_table($table, true);
+ $add_agent_node_html .= html_print_div(
+ [
+ 'class' => 'action-buttons-right-forced',
+ 'content' => html_print_button(
+ __('Add agent node'),
+ '',
+ false,
+ 'add_agent_node();',
+ [
+ 'icon' => 'wand',
+ 'mode' => 'mini',
+ ],
+ true
+ ).html_print_image(
+ 'images/error_red.png',
+ true,
+ [
+ 'id' => 'error_red',
+ 'style' => 'vertical-align: bottom;display: none;',
+ 'class' => 'forced_title',
+ 'alt' => '',
+ 'data-title' => 'data-use_title_for_force_title:1',
+ ],
+ false
+ ),
+ ],
+ true
+ );
+
$output .= ui_toggle(
$add_agent_node_html,
__('Add agent node'),
@@ -3403,57 +3405,74 @@ class NetworkMap
$table = new StdClass();
$table->width = '100%';
+ $table->id = 'add_agent_by_group_network_map';
+ $table->class = 'filter-table-adv';
$table->data = [];
- $table->data[0][0] = __('Group');
- $table->data[0][1] = html_print_select_groups(
- false,
- 'AR',
- false,
- 'group_for_show_agents',
- -1,
- 'choose_group_for_show_agents()',
- __('None'),
- -1,
- true
+ $table->data[0][] = html_print_label_input_block(
+ __('Group'),
+ html_print_select_groups(
+ false,
+ 'AR',
+ false,
+ 'group_for_show_agents',
+ -1,
+ 'choose_group_for_show_agents()',
+ __('None'),
+ -1,
+ true
+ )
);
- $table->data[0][2] = html_print_checkbox(
- 'group_recursion',
- 0,
- false,
- true,
- false,
- 'choose_group_for_show_agents()'
- ).__('Recursion');
-
- $table->data[1][0] = __('Agents');
- $table->data[1][1] = html_print_select(
- [-1 => __('None')],
- 'agents_filter_group',
- -1,
- '',
- '',
- 0,
- true,
- true,
- true,
- '',
- false,
- 'width: 170px;',
- false,
- 5
+ $table->data[0][] = html_print_label_input_block(
+ __('Recursion'),
+ html_print_checkbox_switch(
+ 'group_recursion',
+ 0,
+ false,
+ true,
+ false,
+ 'choose_group_for_show_agents()'
+ )
);
- $table->data[2][0] = '';
- $table->data[2][1] = html_print_button(
- __('Add agent node'),
- '',
- false,
- 'add_agent_node_from_the_filter_group();',
- 'class="sub"',
- true
+
+ $table->data[1][] = html_print_label_input_block(
+ __('Agents'),
+ html_print_select(
+ [-1 => __('None')],
+ 'agents_filter_group',
+ -1,
+ '',
+ '',
+ 0,
+ true,
+ true,
+ true,
+ '',
+ false,
+ 'width: 170px;',
+ false,
+ 5
+ )
);
$add_agent_node_html = html_print_table($table, true);
+ $add_agent_node_html .= html_print_div(
+ [
+ 'class' => 'action-buttons-right-forced',
+ 'content' => html_print_button(
+ __('Add agent node'),
+ '',
+ false,
+ 'add_agent_node_from_the_filter_group();',
+ [
+ 'icon' => 'wand',
+ 'mode' => 'mini',
+ ],
+ true
+ ),
+ ],
+ true
+ );
$output .= ui_toggle(
$add_agent_node_html,
__('Add agent node (filter by group)'),
@@ -3465,36 +3484,52 @@ class NetworkMap
$table = new StdClass();
$table->width = '100%';
+ $table->id = 'add_fictional_network_map';
+ $table->class = 'filter-table-adv';
$table->data = [];
- $table->data[0][0] = __('Name');
- $table->data[0][1] = html_print_input_text(
- 'name_fictional_node',
- '',
- __('name fictional node'),
- '20',
- '50',
- true
+ $table->data[0][] = html_print_label_input_block(
+ __('Name'),
+ html_print_input_text(
+ 'name_fictional_node',
+ '',
+ __('name fictional node'),
+ '20',
+ '50',
+ true
+ )
);
- $table->data[1][0] = __('Networkmap to link');
- $table->data[1][1] = html_print_select(
- $list_networkmaps,
- 'networkmap_to_link',
- 0,
- '',
- '',
- 0,
- true
- );
- $table->data[2][0] = '';
- $table->data[2][1] = html_print_button(
- __('Add fictional node'),
- '',
- false,
- 'add_fictional_node();',
- ['type' => 'link'],
- true
+
+ $table->data[1][] = html_print_label_input_block(
+ __('Networkmap to link'),
+ html_print_select(
+ $list_networkmaps,
+ 'networkmap_to_link',
+ 0,
+ '',
+ '',
+ 0,
+ true
+ )
);
+
$add_agent_node_html = html_print_table($table, true);
+ $add_agent_node_html .= html_print_div(
+ [
+ 'class' => 'action-buttons-right-forced',
+ 'content' => html_print_button(
+ __('Add fictional node'),
+ '',
+ false,
+ 'add_fictional_node();',
+ [
+ 'icon' => 'wand',
+ 'mode' => 'mini',
+ ],
+ true
+ ),
+ ],
+ true
+ );
$output .= ui_toggle(
$add_agent_node_html,
__('Add fictional point'),
@@ -3722,11 +3757,7 @@ class NetworkMap
// Open networkconsole_id div.
$output .= ' fullSize) {
- if ($this->widget) {
- $output .= ' class="networkconsole">';
- } else {
- $output .= ' class="networkconsole">';
- }
+ $output .= ' class="networkconsole">';
} else {
$output .= ' style="width: '.$this->mapOptions['width'].'px; height: '.$this->mapOptions['height'].'px;position: relative; overflow: hidden; background: #FAFAFA">';
}
diff --git a/pandora_console/include/class/TreeService.class.php b/pandora_console/include/class/TreeService.class.php
index e68158c117..69b06fd684 100644
--- a/pandora_console/include/class/TreeService.class.php
+++ b/pandora_console/include/class/TreeService.class.php
@@ -222,22 +222,30 @@ class TreeService extends Tree
switch ($status) {
case SERVICE_STATUS_NORMAL:
- $processed_items[$row['id']]['statusImageHTML'] = ' .') ';
+ $serviceStatusLine = COL_NORMAL;
break;
case SERVICE_STATUS_CRITICAL:
- $processed_items[$row['id']]['statusImageHTML'] = ' .') ';
+ $serviceStatusLine = COL_CRITICAL;
break;
case SERVICE_STATUS_WARNING:
- $processed_items[$row['id']]['statusImageHTML'] = ' .') ';
+ $serviceStatusLine = COL_WARNING;
break;
case SERVICE_STATUS_UNKNOWN:
default:
- $processed_items[$row['id']]['statusImageHTML'] = ' .') ';
+ $serviceStatusLine = COL_UNKNOWN;
break;
}
+
+ $processed_items[$row['id']]['statusImageHTML'] = html_print_div(
+ [
+ 'class' => 'node-service-status',
+ 'style' => 'background-color: '.$serviceStatusLine,
+ ],
+ true
+ );
}
$this->tree = $processed_items;
@@ -510,14 +518,11 @@ class TreeService extends Tree
$tmp['eventAgent'] = $item->module()->id_agente();
$tmp['disabled'] = $item->module()->disabled();
- $html = ' ->lastStatusImage()
+ $html = html_print_div(
+ [ 'style' => 'width:7px;background-color: '.$item->module()->lastStatusColor() ],
+ true
);
- $html .= ') module()->lastStatusTitle().'" />';
+
$tmp['statusImageHTML'] = $html;
$tmp = array_merge(
$tmp,
diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php
index 83f3ad15b0..75b110fd90 100644
--- a/pandora_console/include/config_process.php
+++ b/pandora_console/include/config_process.php
@@ -20,7 +20,7 @@
/**
* Pandora build version and version
*/
-$build_version = 'PC230306';
+$build_version = 'PC230307';
$pandora_version = 'v7.0NG.769';
// Do not overwrite default timezone set if defined.
diff --git a/pandora_console/include/functions_groups.php b/pandora_console/include/functions_groups.php
index 8420c3f2df..6eb91b7afd 100644
--- a/pandora_console/include/functions_groups.php
+++ b/pandora_console/include/functions_groups.php
@@ -440,17 +440,17 @@ function groups_give_disabled_group($id_group)
*/
function groups_get_icon($id_group)
{
- if ($id_group == 0) {
- return 'world';
+ if ((int) $id_group === 0) {
+ $icon = 'unknown@groups.svg';
} else {
$icon = (string) db_get_value('icon', 'tgrupo', 'id_grupo', (int) $id_group);
- if ($icon == '') {
- $icon = 'without_group';
+ if (empty($icon) === true) {
+ $icon = 'unknown@groups.svg';
}
-
- return $icon;
}
+
+ return $icon;
}
diff --git a/pandora_console/include/functions_html.php b/pandora_console/include/functions_html.php
index fc46094c74..693a14adb7 100644
--- a/pandora_console/include/functions_html.php
+++ b/pandora_console/include/functions_html.php
@@ -6551,7 +6551,7 @@ function html_print_go_back_button(string $url, array $options=[], bool $return=
($options['title'] ?? __('Go back')),
'go_back',
false,
- 'window.location.href = \''.$url.'\'',
+ 'window.location.href = "'.$url.'"',
[
'icon' => ($options['action_class'] ?? 'back'),
'mode' => 'secondary',
diff --git a/pandora_console/include/functions_treeview.php b/pandora_console/include/functions_treeview.php
index b92aae0ce2..b43d6bba95 100755
--- a/pandora_console/include/functions_treeview.php
+++ b/pandora_console/include/functions_treeview.php
@@ -702,7 +702,7 @@ function treeview_printTable($id_agente, $server_data=[], $no_head=false)
// Events graph toggle.
$eventsGraph = html_print_div(
[
- 'class' => 'graphic_agents',
+ 'style' => 'height: 150px;',
'content' => graph_graphic_agentevents(
$id_agente,
'500px;',
@@ -732,7 +732,7 @@ function treeview_printTable($id_agente, $server_data=[], $no_head=false)
);
if ($config['agentaccess']) {
- $access_graph = ' ';
+ $access_graph = ' ';
$access_graph .= graphic_agentaccess(
$id_agente,
SECONDS_1DAY,
diff --git a/pandora_console/include/get_file.php b/pandora_console/include/get_file.php
index f312340df5..8c9d849ea9 100644
--- a/pandora_console/include/get_file.php
+++ b/pandora_console/include/get_file.php
@@ -97,6 +97,7 @@ if (empty($file) === true || empty($hash) === true || $hash !== md5($file_raw.$c
header('Content-Length: '.filesize($downloadable_file));
header('Content-Disposition: attachment; filename="'.basename($downloadable_file).'"');
readfile($downloadable_file);
+ return;
}
}
diff --git a/pandora_console/include/graphs/flot/pandora.flot.js b/pandora_console/include/graphs/flot/pandora.flot.js
index 0b48540052..750ec4781a 100644
--- a/pandora_console/include/graphs/flot/pandora.flot.js
+++ b/pandora_console/include/graphs/flot/pandora.flot.js
@@ -2318,10 +2318,9 @@ function pandoraFlotArea(
);
}
- $("#menu_cancelzoom_" + graph_id).attr(
- "src",
- homeurl + "images/zoom_cross_grey.png"
- );
+ $("#menu_cancelzoom_" + graph_id)
+ .attr("src", homeurl + "images/disable.svg")
+ .removeClass("alpha50");
max_draw["max"] = ranges.yaxis.to;
max_draw["min"] = ranges.yaxis.from;
@@ -2813,11 +2812,8 @@ function pandoraFlotArea(
legend: { show: true }
})
);
- $("#menu_cancelzoom_" + graph_id).attr(
- "src",
- homeurl + "images/zoom_cross.disabled.png"
- );
- $("#menu_cancelzoom_" + graph_id).attr("class", "invert_filter");
+ $("#menu_cancelzoom_" + graph_id).addClass("alpha50");
+ //$("#menu_cancelzoom_" + graph_id).attr("class", "invert_filter");
overview.clearSelection();
thresholded = false;
max_draw = [];
diff --git a/pandora_console/include/graphs/functions_flot.php b/pandora_console/include/graphs/functions_flot.php
index b76abb634e..4c5811b746 100644
--- a/pandora_console/include/graphs/functions_flot.php
+++ b/pandora_console/include/graphs/functions_flot.php
@@ -367,7 +367,7 @@ function menu_graph(
$return .= " |