';
// Cannot change primary group if user have not permission for that group.
if (isset($groups[$grupo]) || $new_agent) {
- $table_primary_group .= html_print_select_groups(false, 'AR', false, 'grupo', $grupo, '', '', 0, true);
+ $table_primary_group .= html_print_input(
+ [
+ 'type' => 'select_groups',
+ 'returnAllGroup' => false,
+ 'name' => 'grupo',
+ 'selected' => $grupo,
+ 'return' => true,
+ 'required' => true,
+ ]
+ );
} else {
$table_primary_group .= groups_get_name($grupo);
$table_primary_group .= html_print_input_hidden('grupo', $grupo, true);
@@ -424,44 +433,66 @@ if (enterprise_installed()) {
$secondary_groups_selected = enterprise_hook('agents_get_secondary_groups', [$id_agente]);
$adv_secondary_groups_label = '
'.__('Secondary groups').'
';
$adv_secondary_groups_left = html_print_select_groups(
- false,
+ // Id_user.
// Use the current user to select the groups.
- 'AR',
- // ACL permission.
false,
+ // Privilege.
+ // ACL permission.
+ 'AR',
+ // ReturnAllGroup.
// Not all group.
- 'secondary_groups',
+ false,
+ // Name.
// HTML id.
- '',
+ 'secondary_groups',
+ // Selected.
// No select any by default.
'',
+ // Script.
// Javascript onChange code.
'',
+ // Nothing.
// Do not user no selected value.
- 0,
+ false,
+ // Nothing_value.
// Do not use no selected value.
- true,
+ 0,
+ // Return.
// Return HTML (not echo).
true,
+ // Multiple.
// Multiple selection.
true,
+ // Sort.
// Sorting by default.
- '',
+ true,
+ // Class.
// CSS classnames (default).
- false,
+ '',
+ // Disabled.
// Not disabled (default).
- 'min-width:170px;',
- // Inline styles (default).
false,
+ // Style.
+ // Inline styles (default).
+ 'min-width:170px;',
+ // Option_style.
// Option style select (default).
false,
+ // Id_group.
// Do not truncate the users tree (default).
- 'id_grupo',
- // Key to get as value (default).
false,
+ // Keys_field.
+ // Key to get as value (default).
+ 'id_grupo',
+ // Strict_user.
// Not strict user (default).
- $secondary_groups_selected['plain']
+ false,
+ // Delete_groups.
// Do not show the primary group in this selection.
+ array_merge($secondary_groups_selected['plain'], [$agent['id_grupo']])
+ // Include_groups.
+ // Size.
+ // Simple_multiple_options.
);
$adv_secondary_groups_arrows = html_print_input_image(
@@ -489,30 +520,30 @@ if (enterprise_installed()) {
);
$adv_secondary_groups_right .= html_print_select(
- $secondary_groups_selected['for_select'],
// Values.
- 'secondary_groups_selected',
+ $secondary_groups_selected['for_select'],
// HTML id.
- '',
+ 'secondary_groups_selected',
// Selected.
'',
// Javascript onChange code.
'',
// Nothing selected.
- 0,
+ false,
// Nothing selected.
- true,
+ 0,
// Return HTML (not echo).
true,
// Multiple selection.
true,
// Sort.
- '',
+ true,
// Class.
- false,
+ '',
// Disabled.
- 'min-width:170px;'
+ false,
// Style.
+ 'min-width:170px;'
);
// Safe operation mode.
diff --git a/pandora_console/godmode/agentes/modificar_agente.php b/pandora_console/godmode/agentes/modificar_agente.php
index 989d8e7cec..d4036bd68c 100644
--- a/pandora_console/godmode/agentes/modificar_agente.php
+++ b/pandora_console/godmode/agentes/modificar_agente.php
@@ -173,8 +173,9 @@ if (!$own_info['is_admin'] && !check_acl($config['id_user'], 0, 'AR') && !check_
$return_all_group = true;
}
+echo '
';
html_print_select_groups(false, 'AR', $return_all_group, 'ag_group', $ag_group, 'this.form.submit();', '', 0, false, false, true, '', false);
-
+echo '
';
echo '
';
echo __('Show Agents').' ';
$fields = [
diff --git a/pandora_console/godmode/agentes/planned_downtime.editor.php b/pandora_console/godmode/agentes/planned_downtime.editor.php
index 3a055678e8..b3e7029dbd 100644
--- a/pandora_console/godmode/agentes/planned_downtime.editor.php
+++ b/pandora_console/godmode/agentes/planned_downtime.editor.php
@@ -645,7 +645,7 @@ $table->data[0][1] = html_print_input_text(
$disabled_in_execution
);
$table->data[1][0] = __('Group');
-$table->data[1][1] = html_print_select_groups(
+$table->data[1][1] = ''.html_print_select_groups(
false,
$access,
true,
@@ -659,7 +659,7 @@ $table->data[1][1] = html_print_select_groups(
true,
'',
$disabled_in_execution
-);
+).'
';
$table->data[2][0] = __('Description');
$table->data[2][1] = html_print_textarea(
'description',
diff --git a/pandora_console/godmode/alerts/alert_special_days.php b/pandora_console/godmode/alerts/alert_special_days.php
index 11e9732773..a27c02ea9a 100644
--- a/pandora_console/godmode/alerts/alert_special_days.php
+++ b/pandora_console/godmode/alerts/alert_special_days.php
@@ -296,7 +296,9 @@ if (!users_can_manage_group_all('LM')) {
$can_manage_group_all = true;
}
+echo '';
html_print_select_groups(false, 'LM', $can_manage_group_all, 'id_group', $id_group, false, '', 0, false, false, true, '', false, 'width:100px;');
+echo '
';
echo ' ';
echo __('Overwrite');
ui_print_help_tip(__('Check this box, if you want to overwrite existing same days.'), false);
diff --git a/pandora_console/godmode/alerts/configure_alert_action.php b/pandora_console/godmode/alerts/configure_alert_action.php
index 0c9f2c6931..4d49cdd22b 100644
--- a/pandora_console/godmode/alerts/configure_alert_action.php
+++ b/pandora_console/godmode/alerts/configure_alert_action.php
@@ -168,7 +168,7 @@ $table->data[1][0] = __('Group');
$own_info = get_user_info($config['id_user']);
-$table->data[1][1] = html_print_select_groups(
+$table->data[1][1] = ''.html_print_select_groups(
false,
'LW',
true,
@@ -182,7 +182,7 @@ $table->data[1][1] = html_print_select_groups(
true,
'',
$is_central_policies_on_node
-);
+).'
';
$table->colspan[1][1] = 2;
$table->data[2][0] = __('Command');
diff --git a/pandora_console/godmode/alerts/configure_alert_command.php b/pandora_console/godmode/alerts/configure_alert_command.php
index 9300dc038b..99b676ccd7 100644
--- a/pandora_console/godmode/alerts/configure_alert_command.php
+++ b/pandora_console/godmode/alerts/configure_alert_command.php
@@ -218,7 +218,7 @@ $table->data['command'][1] = html_print_textarea(
$table->colspan['group'][1] = 3;
$table->data['group'][0] = __('Group');
-$table->data['group'][1] = html_print_select_groups(
+$table->data['group'][1] = ''.html_print_select_groups(
false,
'LM',
true,
@@ -232,7 +232,7 @@ $table->data['group'][1] = html_print_select_groups(
true,
'',
$is_central_policies_on_node
-);
+).'
';
$table->colspan['description'][1] = 3;
$table->data['description'][0] = __('Description');
diff --git a/pandora_console/godmode/alerts/configure_alert_template.php b/pandora_console/godmode/alerts/configure_alert_template.php
index 16957efbe4..be0948ee97 100644
--- a/pandora_console/godmode/alerts/configure_alert_template.php
+++ b/pandora_console/godmode/alerts/configure_alert_template.php
@@ -1099,7 +1099,7 @@ if ($step == 2) {
}
$table->data[0][1] .= ' ';
- $table->data[0][1] .= html_print_select_groups(
+ $table->data[0][1] .= ''.html_print_select_groups(
false,
'AR',
$display_all_group,
@@ -1113,7 +1113,7 @@ if ($step == 2) {
true,
'',
$is_central_policies_on_node
- );
+ ).'
';
$table->data[1][0] = __('Description');
diff --git a/pandora_console/godmode/events/event_edit_filter.php b/pandora_console/godmode/events/event_edit_filter.php
index a677c6f801..56201e3a28 100644
--- a/pandora_console/godmode/events/event_edit_filter.php
+++ b/pandora_console/godmode/events/event_edit_filter.php
@@ -241,7 +241,7 @@ if ($returnAllGroup === false && $id_group_filter == 0) {
$returnAllGroup = true;
}
-$table->data[1][1] = html_print_select_groups(
+$table->data[1][1] = ''.html_print_select_groups(
$config['id_user'],
$access,
$returnAllGroup,
@@ -260,21 +260,21 @@ $table->data[1][1] = html_print_select_groups(
false,
'id_grupo',
$strict_user
-);
+).'
';
$table->data[2][0] = ''.__('Group').' ';
$display_all_group = (users_is_admin() || users_can_manage_group_all('AR'));
-$table->data[2][1] = html_print_select_groups(
+$table->data[2][1] = ''.html_print_select_groups(
$config['id_user'],
'AR',
$display_all_group,
'id_group',
- $idGroup,
+ $id_group,
'',
'',
'',
true
-);
+).'
';
$types = get_event_types();
// Expand standard array to add not_normal (not exist in the array, used only for searches)
diff --git a/pandora_console/godmode/groups/configure_group.php b/pandora_console/godmode/groups/configure_group.php
index 7fe4d6e876..72fe425fca 100644
--- a/pandora_console/godmode/groups/configure_group.php
+++ b/pandora_console/godmode/groups/configure_group.php
@@ -145,7 +145,8 @@ if ($id_group) {
$table->data[2][1] = __('You have not access to the parent.').html_print_input_hidden('id_parent', $id_parent, true);
} else {
- $table->data[2][1] = html_print_select_groups(
+ $table->data[2][1] = '';
+ $table->data[2][1] .= html_print_select_groups(
false,
'AR',
true,
@@ -163,9 +164,12 @@ if ($id_group) {
false,
$id_group
);
+ $table->data[2][1] .= '
';
}
} else {
- $table->data[2][1] = html_print_select_groups(false, 'AR', true, 'id_parent', $id_parent, '', '', '', true);
+ $table->data[2][1] = '';
+ $table->data[2][1] .= html_print_select_groups(false, 'AR', true, 'id_parent', $id_parent, '', '', '', true);
+ $table->data[2][1] .= '
';
}
if ($acl_parent) {
diff --git a/pandora_console/godmode/reporting/create_container.php b/pandora_console/godmode/reporting/create_container.php
index 5cfcb14338..e35b1f7a54 100644
--- a/pandora_console/godmode/reporting/create_container.php
+++ b/pandora_console/godmode/reporting/create_container.php
@@ -222,12 +222,14 @@ if ($own_info['is_admin'] || check_acl($config['id_user'], 0, 'PM')) {
}
echo " ".__('Group').' ';
+echo '';
if ($id_container === '1') {
echo html_print_select_groups($config['id_user'], '', $return_all_groups, 'container_id_group', $id_group, '', '', '', true, false, true, '', true);
} else {
echo html_print_select_groups($config['id_user'], '', $return_all_groups, 'container_id_group', $id_group, '', '', '', true, false, true, '', false);
}
+echo '
';
echo ' ';
echo '
';
@@ -500,7 +502,7 @@ if ($edit_container) {
$data = [];
$data[0] = __('Group');
- $data[1] = html_print_select_groups($config['id_user'], 'RW', $return_all_groups, 'container_id_group', $id_group, '', '', '', true);
+ $data[1] = ''.html_print_select_groups($config['id_user'], 'RW', $return_all_groups, 'container_id_group', $id_group, '', '', '', true).'
';
$table->data[] = $data;
$table->rowclass[] = '';
diff --git a/pandora_console/godmode/reporting/graph_builder.main.php b/pandora_console/godmode/reporting/graph_builder.main.php
index e6e0bcb862..d50a5d8b55 100644
--- a/pandora_console/godmode/reporting/graph_builder.main.php
+++ b/pandora_console/godmode/reporting/graph_builder.main.php
@@ -1,29 +1,44 @@
";
-
+$url = 'index.php?sec=reporting&sec2=godmode/reporting/graph_builder';
if ($edit_graph) {
- echo " ';
if ($stacked == CUSTOM_GRAPH_GAUGE) {
$hidden = ' style="display:none;" ';
} else {
$hidden = '';
}
-echo '
';
-echo "";
-echo ''.__('Period').' ';
-echo "";
-html_print_extended_select_for_time('period', $period, '', '', '0', 10);
-echo " ";
-echo ''.__('Type of graph').' ';
-echo " ";
+$output .= '
';
+$output .= "";
+$output .= ''.__('Period').' ';
+$output .= "";
+$output .= html_print_extended_select_for_time(
+ 'period',
+ $period,
+ '',
+ '',
+ '0',
+ 10,
+ true
+);
+$output .= " ";
+$output .= ''.__('Type of graph').' ';
+$output .= " ";
require_once $config['homedir'].'/include/functions_graph.php';
@@ -158,85 +205,149 @@ $stackeds = [
CUSTOM_GRAPH_VBARS => __('Vertical bars'),
CUSTOM_GRAPH_PIE => __('Pie'),
];
-html_print_select($stackeds, 'stacked', $stacked);
+$output .= html_print_select($stackeds, 'stacked', $stacked, '', '', 0, true);
-echo '
';
+$output .= '
';
-echo "
".__('Percentil').' ';
-echo "".html_print_checkbox('percentil', 1, $percentil, true).' ';
-echo "".__('Equalize maximum thresholds').' ';
-echo "".html_print_checkbox('threshold', CUSTOM_GRAPH_BULLET_CHART_THRESHOLD, $check, true, false, '', false);
-echo ' ';
-echo "
".__('Add summatory series').' ';
-echo "".html_print_checkbox('summatory_series', 1, $summatory_series, true)."
-".__('Add average series').' ';
-echo "".html_print_checkbox('average_series', 1, $average_series, true).' ';
-echo "
".__('Modules and series').' ';
+$output .= '';
+$output .= "";
+$output .= __('Equalize maximum thresholds');
+$output .= ' ';
+$output .= "";
+$output .= html_print_checkbox(
+ 'threshold',
+ CUSTOM_GRAPH_BULLET_CHART_THRESHOLD,
+ $check,
+ true,
+ false,
+ '',
+ false
+);
+$output .= ' ';
-echo "
".html_print_checkbox('modules_series', 1, $modules_series, true).' ';
-echo "
".__('Show full scale graph (TIP)').' ';
-echo "
".html_print_checkbox('fullscale', 1, $fullscale, true).' ';
-echo '';
-echo '';
+$output .= "
";
+$output .= __('Percentil');
+$output .= ' ';
+$output .= "";
+$output .= html_print_checkbox(
+ 'percentil',
+ 1,
+ $percentil,
+ true
+);
+$output .= ' ';
+$output .= '';
+
+$output .= "
";
+$output .= __('Add summatory series');
+$output .= ' ';
+$output .= "";
+$output .= html_print_checkbox(
+ 'summatory_series',
+ 1,
+ $summatory_series,
+ true
+);
+$output .= " ";
+$output .= __('Add average series');
+$output .= ' ';
+$output .= "";
+$output .= html_print_checkbox(
+ 'average_series',
+ 1,
+ $average_series,
+ true
+);
+$output .= ' ';
+$output .= "
";
+$output .= __('Modules and series');
+$output .= ' ';
+$output .= "";
+$output .= html_print_checkbox('modules_series', 1, $modules_series, true);
+$output .= ' ';
+$output .= "";
+$output .= __('Show full scale graph (TIP)');
+$output .= ' ';
+$output .= "";
+$output .= html_print_checkbox('fullscale', 1, $fullscale, true);
+$output .= ' ';
+$output .= '';
+
+$output .= '';
if ($edit_graph) {
- echo "
";
+ $output .= "
";
+ $output .= " ";
+ $output .= '
';
} else {
- echo "
";
+ $output .= "
";
+ $output .= " ";
+ $output .= '
';
}
-echo '';
+$output .= '';
+echo $output;
+?>
+';
+ $("#checkbox-summatory_series").change(function() {
+ if( $("#checkbox-summatory_series").is(":checked") &&
+ $("#checkbox-modules_series").is(":disabled")
+ ) {
+ $("#checkbox-modules_series").removeAttr("disabled");
+ } else if(!$("#checkbox-average_series").is(":checked")) {
+ $("#checkbox-modules_series").attr("disabled", true);
+ $("#checkbox-modules_series").attr("checked", false);
+ }
+ });
+
+ $("#checkbox-average_series").change(function() {
+ if( $("#checkbox-average_series").is(":checked") &&
+ $("#checkbox-modules_series").is(":disabled")
+ ) {
+ $("#checkbox-modules_series").removeAttr("disabled");
+ } else if(!$("#checkbox-summatory_series").is(":checked")) {
+ $("#checkbox-modules_series").attr("disabled", true);
+ $("#checkbox-modules_series").attr("checked", false);
+ }
+ });
+ });
+
diff --git a/pandora_console/godmode/reporting/graph_builder.php b/pandora_console/godmode/reporting/graph_builder.php
index 23aa4b0771..f0262f6e5f 100644
--- a/pandora_console/godmode/reporting/graph_builder.php
+++ b/pandora_console/godmode/reporting/graph_builder.php
@@ -1,16 +1,31 @@
$config['id_user'],
'name' => $name,
@@ -114,7 +131,7 @@ if ($add_graph) {
if (trim($name) != '') {
$id_graph = db_process_sql_insert('tgraph', $values);
if ($id_graph !== false) {
- db_pandora_audit('Report management', "Create graph #$id_graph");
+ db_pandora_audit('Report management', 'Create graph #'.$id_graph);
} else {
db_pandora_audit('Report management', 'Fail try to create graph');
}
@@ -166,9 +183,15 @@ if ($update_graph) {
['id_graph' => $id_graph]
);
if ($success !== false) {
- db_pandora_audit('Report management', "Update graph #$id_graph");
+ db_pandora_audit(
+ 'Report management',
+ 'Update graph #'.$id_graph
+ );
} else {
- db_pandora_audit('Report management', "Fail try to update graph #$id_graph");
+ db_pandora_audit(
+ 'Report management',
+ 'Fail try to update graph #'.$id_graph
+ );
}
} else {
$success = false;
@@ -188,12 +211,12 @@ if ($add_module) {
$id_agents = get_parameter('id_agents');
$weight = get_parameter('weight');
- // Id modules has double entities conversion
- // Safe output remove all entities
+ // Id modules has double entities conversion.
+ // Safe output remove all entities.
io_safe_output_array($id_modules, '');
// We need to put the entities again
- // to browse in db
+ // to browse in db.
io_safe_input_array($id_modules);
$id_agent_modules = db_get_all_rows_sql(
@@ -304,23 +327,39 @@ switch ($tab) {
}
if ($add_graph) {
- ui_print_result_message($id_graph, __('Graph stored successfully'), __('There was a problem storing Graph'));
+ ui_print_result_message(
+ $id_graph,
+ __('Graph stored successfully'),
+ __('There was a problem storing Graph')
+ );
}
if ($add_module) {
- ui_print_result_message($result, __('Module added successfully'), __('There was a problem adding Module'));
+ ui_print_result_message(
+ $result,
+ __('Module added successfully'),
+ __('There was a problem adding Module')
+ );
}
if ($update_graph) {
- ui_print_result_message($success, __('Update the graph'), __('Bad update the graph'));
+ ui_print_result_message(
+ $success,
+ __('Update the graph'),
+ __('Bad update the graph')
+ );
}
if ($delete_module) {
- ui_print_result_message($result, __('Graph deleted successfully'), __('There was a problem deleting Graph'));
+ ui_print_result_message(
+ $result,
+ __('Graph deleted successfully'),
+ __('There was a problem deleting Graph')
+ );
}
-// Parse CHUNK information into showable information
-// Split id to get all parameters
+// Parse CHUNK information into showable information.
+// Split id to get all parameters.
if (!$delete_module) {
if (isset($_POST['period'])) {
$period = $_POST['period'];
diff --git a/pandora_console/godmode/reporting/map_builder.php b/pandora_console/godmode/reporting/map_builder.php
index 75aaa35d2d..9f8b8f0162 100644
--- a/pandora_console/godmode/reporting/map_builder.php
+++ b/pandora_console/godmode/reporting/map_builder.php
@@ -307,8 +307,9 @@ if (!$own_info['is_admin'] && !check_acl($config['id_user'], 0, 'VR')) {
$return_all_group = true;
}
+echo '
';
html_print_select_groups(false, 'AR', $return_all_group, 'ag_group', $ag_group, 'this.form.submit();', '', 0, false, false, true, '', false);
-
+echo '
';
echo "
";
echo __('Group Recursion').' ';
html_print_checkbox('recursion', 1, $recursion, false, false, 'this.form.submit()');
diff --git a/pandora_console/godmode/reporting/reporting_builder.item_editor.php b/pandora_console/godmode/reporting/reporting_builder.item_editor.php
index ed12e6b714..db1303d907 100755
--- a/pandora_console/godmode/reporting/reporting_builder.item_editor.php
+++ b/pandora_console/godmode/reporting/reporting_builder.item_editor.php
@@ -1264,6 +1264,7 @@ $class = 'databox filters';
';
if (check_acl($config['id_user'], 0, 'RW')) {
html_print_select_groups(
$config['id_user'],
@@ -1284,6 +1285,8 @@ $class = 'databox filters';
);
}
+ echo '';
+
echo ' '.__('Recursion').' '.html_print_checkbox_switch(
'recursion',
1,
@@ -2122,7 +2125,7 @@ $class = 'databox filters';
diff --git a/pandora_console/godmode/reporting/reporting_builder.main.php b/pandora_console/godmode/reporting/reporting_builder.main.php
index 652de3552c..b8b375bed1 100755
--- a/pandora_console/godmode/reporting/reporting_builder.main.php
+++ b/pandora_console/godmode/reporting/reporting_builder.main.php
@@ -92,122 +92,113 @@ $table->data['group'][0] = __('Group');
$write_groups = users_get_groups_for_select(false, 'AR', true, true, false, 'id_grupo');
- html_print_select_groups(
- $config['id_user'],
- 'AR',
- true,
- 'id_group',
- $idGroup,
+
+
+
+// If the report group is not among the RW groups (special permission) we add it
+if (!isset($write_groups[$idGroupReport]) && $idGroupReport) {
+ $write_groups[$idGroupReport] = groups_get_name($idGroupReport);
+}
+
+$table->data['group'][1] = '';
+$table->data['group'][1] .= html_print_select_groups(
+ $config['id_user'],
+ 'AR',
+ true,
+ 'id_group',
+ $idGroupReport,
+ '',
+ '',
+ '',
+ true
+);
+$table->data['group'][1] .= '
';
+
+if ($report_id_user == $config['id_user']
+ || is_user_admin($config['id_user'])
+) {
+ // S/he is the creator of report (or admin) and s/he can change the access.
+ $type_access = [
+ 'group_view' => __('Only the group can view the report'),
+ 'group_edit' => __('The next group can edit the report'),
+ 'user_edit' => __('Only the user and admin user can edit the report'),
+ ];
+ $table->data['access'][0] = __('Write Access').ui_print_help_tip(__('For example, you want a report that the people of "All" groups can see but you want to edit only for you or your group.'), true);
+ $table->data['access'][1] = html_print_select(
+ $type_access,
+ 'type_access',
+ $type_access_selected,
+ 'change_type_access(this)',
'',
+ 0,
+ true
+ );
+
+ $style = 'display: none;';
+ if ($type_access_selected == 'group_edit') {
+ $style = '';
+ }
+
+ $table->data['access'][1] .= '';
+ $table->data['access'][1] .= '';
+ $table->data['access'][1] .= html_print_select_groups(
+ false,
+ 'RW',
+ false,
+ 'id_group_edit',
+ $id_group_edit,
+ false,
'',
'',
true
);
+ $table->data['access'][1] .= '
';
+ $table->data['access'][1] .= ' ';
+}
-
- // If the report group is not among the RW groups (special permission) we add it
- if (!isset($write_groups[$idGroupReport]) && $idGroupReport) {
- $write_groups[$idGroupReport] = groups_get_name($idGroupReport);
+if ($enterpriseEnable) {
+ $non_interactive_check = false;
+ if (isset($non_interactive)) {
+ $non_interactive_check = $non_interactive;
}
- $table->data['group'][1] = html_print_select(
- $write_groups,
- 'id_group',
- $idGroupReport,
- false,
+ $table->data['interactive_report'][0] = __('Non interactive report');
+ $table->data['interactive_report'][1] = __('Yes').' '.html_print_radio_button(
+ 'non_interactive',
+ 1,
'',
+ $non_interactive_check,
+ true
+ ).' ';
+ $table->data['interactive_report'][1] .= __('No').' '.html_print_radio_button(
+ 'non_interactive',
+ 0,
'',
- true,
- false,
- false
+ $non_interactive_check,
+ true
);
+}
- if ($report_id_user == $config['id_user']
- || is_user_admin($config['id_user'])
- ) {
- // S/he is the creator of report (or admin) and s/he can change the access.
- $type_access = [
- 'group_view' => __('Only the group can view the report'),
- 'group_edit' => __('The next group can edit the report'),
- 'user_edit' => __('Only the user and admin user can edit the report'),
- ];
- $table->data['access'][0] = __('Write Access').ui_print_help_tip(__('For example, you want a report that the people of "All" groups can see but you want to edit only for you or your group.'), true);
- $table->data['access'][1] = html_print_select(
- $type_access,
- 'type_access',
- $type_access_selected,
- 'change_type_access(this)',
- '',
- 0,
- true
- );
+$table->data['description'][0] = __('Description');
+$table->data['description'][1] = html_print_textarea('description', 5, 15, $description, '', true);
- $style = 'display: none;';
- if ($type_access_selected == 'group_edit') {
- $style = '';
- }
+echo '';
+html_print_table($table);
- $table->data['access'][1] .= '
- '.html_print_select_groups(
- false,
- 'RW',
- false,
- 'id_group_edit',
- $id_group_edit,
- false,
- '',
- '',
- true
- ).'
- ';
- }
-
- if ($enterpriseEnable) {
- $non_interactive_check = false;
- if (isset($non_interactive)) {
- $non_interactive_check = $non_interactive;
- }
-
- $table->data['interactive_report'][0] = __('Non interactive report');
- $table->data['interactive_report'][1] = __('Yes').' '.html_print_radio_button(
- 'non_interactive',
- 1,
- '',
- $non_interactive_check,
- true
- ).' ';
- $table->data['interactive_report'][1] .= __('No').' '.html_print_radio_button(
- 'non_interactive',
- 0,
- '',
- $non_interactive_check,
- true
- );
- }
-
- $table->data['description'][0] = __('Description');
- $table->data['description'][1] = html_print_textarea('description', 5, 15, $description, '', true);
-
- echo ' ';
- html_print_table($table);
-
- echo '';
- echo $actionButtonHtml;
- html_print_input_hidden('action', $hiddenFieldAction);
- html_print_input_hidden('id_report', $idReport);
- echo '
';
- ?>
+echo '';
+echo $actionButtonHtml;
+html_print_input_hidden('action', $hiddenFieldAction);
+html_print_input_hidden('id_report', $idReport);
+echo '
';
+?>
diff --git a/pandora_console/godmode/reporting/visual_console_builder.data.php b/pandora_console/godmode/reporting/visual_console_builder.data.php
index 0b765debad..5a0d4fb0f5 100644
--- a/pandora_console/godmode/reporting/visual_console_builder.data.php
+++ b/pandora_console/godmode/reporting/visual_console_builder.data.php
@@ -136,7 +136,7 @@ if ($action == 'new') {
$table->data[1][0] = __('Group:');
-$table->data[1][1] = html_print_select_groups(
+$table->data[1][1] = ''.html_print_select_groups(
$config['id_user'],
'RW',
true,
@@ -146,7 +146,7 @@ $table->data[1][1] = html_print_select_groups(
'',
'',
true
-);
+).'
';
$backgrounds_list = list_files(
$config['homedir'].'/images/console/background/',
'jpg',
diff --git a/pandora_console/godmode/reporting/visual_console_builder.wizard.php b/pandora_console/godmode/reporting/visual_console_builder.wizard.php
index 6079d4bb1d..9f34ddd042 100644
--- a/pandora_console/godmode/reporting/visual_console_builder.wizard.php
+++ b/pandora_console/godmode/reporting/visual_console_builder.wizard.php
@@ -381,7 +381,7 @@ if (is_metaconsole()) {
$table->rowstyle['all_3'] = 'display: none;';
$table->data['all_3'][0] = __('Groups');
$table->colspan['all_3'][1] = '3';
-$table->data['all_3'][1] = html_print_select_groups(
+$table->data['all_3'][1] = ''.html_print_select_groups(
$config['id_user'],
'AR',
true,
@@ -391,7 +391,7 @@ $table->data['all_3'][1] = html_print_select_groups(
'',
0,
true
-);
+).'
';
$table->rowstyle['all_one_item_per_agent'] = 'display: none';
diff --git a/pandora_console/godmode/setup/news.php b/pandora_console/godmode/setup/news.php
index 864add252b..146eae9b79 100644
--- a/pandora_console/godmode/setup/news.php
+++ b/pandora_console/godmode/setup/news.php
@@ -176,7 +176,9 @@ if ((isset($_GET['form_add'])) || (isset($_GET['form_edit']))) {
$data[0] .= ' ';
$data[1] = __('Group').' ';
+ $data[1] .= '';
$data[1] .= html_print_select_groups($config['id_user'], 'ER', users_can_manage_group_all(), 'id_group', $id_group, '', '', 0, true, false, false, '');
+ $data[1] .= '
';
$data[2] = __('Modal screen').' ';
$data[2] .= html_print_checkbox_extended('modal', 1, $modal, false, '', 'style="margin-top: 5px;margin-bottom: 7px;"', true);
diff --git a/pandora_console/godmode/setup/setup_visuals.php b/pandora_console/godmode/setup/setup_visuals.php
index e21c3b6e55..8c07381452 100755
--- a/pandora_console/godmode/setup/setup_visuals.php
+++ b/pandora_console/godmode/setup/setup_visuals.php
@@ -917,6 +917,15 @@ $row++;
);
$row++;
+ $table_chars->data[$row][0] = __('Chart fit to content');
+ $table_chars->data[$row][1] = html_print_checkbox_switch(
+ 'maximum_y_axis',
+ 1,
+ $config['maximum_y_axis'],
+ true
+ );
+ $row++;
+
$table_chars->data[$row][0] = __('Type of module charts');
$table_chars->data[$row][1] = __('Area').' '.html_print_radio_button(
'type_module_charts',
diff --git a/pandora_console/godmode/snmpconsole/snmp_alert.php b/pandora_console/godmode/snmpconsole/snmp_alert.php
index 20f275071e..ee6ad32a26 100755
--- a/pandora_console/godmode/snmpconsole/snmp_alert.php
+++ b/pandora_console/godmode/snmpconsole/snmp_alert.php
@@ -776,6 +776,7 @@ if ($create_alert || $update_alert) {
// Group
echo ' '.__('Group').' ';
+ echo '';
html_print_select_groups(
$config['id_user'],
'AR',
@@ -796,6 +797,7 @@ if ($create_alert || $update_alert) {
'id_grupo',
false
);
+ echo '
';
echo ' ';
// Trap type
diff --git a/pandora_console/godmode/wizards/HostDevices.class.php b/pandora_console/godmode/wizards/HostDevices.class.php
index 80810b7cf2..2a15affd94 100755
--- a/pandora_console/godmode/wizards/HostDevices.class.php
+++ b/pandora_console/godmode/wizards/HostDevices.class.php
@@ -934,7 +934,6 @@ class HostDevices extends Wizard
'selected' => $this->task['id_group'],
'return' => true,
'class' => 'discovery_list_input',
- 'size' => 9,
'simple_multiple_options' => true,
]
);
diff --git a/pandora_console/include/ajax/group.php b/pandora_console/include/ajax/group.php
new file mode 100644
index 0000000000..0d13cd108f
--- /dev/null
+++ b/pandora_console/include/ajax/group.php
@@ -0,0 +1,71 @@
+ 'noaccess']);
+ } else {
+ include 'general/noaccess.php';
+ }
+
+ exit;
+}
+
+
+// AJAX controller.
+if (is_ajax()) {
+ $method = get_parameter('method');
+
+ if (method_exists('PandoraFMS\Group', $method) === true) {
+ if (Group::ajaxMethod($method) === true) {
+ Group::{$method}();
+ } else {
+ Group::error('Unavailable method.');
+ }
+ } else {
+ Group::error('Method not found. ['.$method.']');
+ }
+
+ // Stop any execution.
+ exit;
+} else {
+ // Run.
+ $cs->run();
+}
diff --git a/pandora_console/include/class/CredentialStore.class.php b/pandora_console/include/class/CredentialStore.class.php
index adf9d6ed06..073f0831a3 100644
--- a/pandora_console/include/class/CredentialStore.class.php
+++ b/pandora_console/include/class/CredentialStore.class.php
@@ -765,17 +765,16 @@ class CredentialStore extends Wizard
'form' => [
'inputs' => [
[
- 'label' => __('Group'),
- 'type' => 'select',
- 'id' => 'filter_id_group',
- 'name' => 'filter_id_group',
- 'options' => users_get_groups_for_select(
- $config['id_user'],
- 'AR',
- true,
- true,
- false
- ),
+ 'label' => __('Group'),
+ 'type' => 'select_groups',
+ 'id' => 'filter_id_group',
+ 'name' => 'filter_id_group',
+ 'privilege' => 'AR',
+ 'type' => 'select_groups',
+ 'nothing' => false,
+ 'selected' => (defined($id_group_filter) ? $id_group_filter : 0),
+ 'return' => true,
+ 'size' => '80%',
],
[
'label' => __('Free search'),
@@ -852,13 +851,14 @@ class CredentialStore extends Wizard
$inputs[] = [
'label' => __('Group'),
'arguments' => [
- 'name' => 'id_group',
- 'id' => 'id_group',
- 'input_class' => 'flex-row',
- 'type' => 'select_groups',
- 'selected' => $values['id_group'],
- 'return' => true,
- 'class' => 'w50p',
+ 'name' => 'id_group',
+ 'id' => 'id_group',
+ 'input_class' => 'flex-row',
+ 'type' => 'select_groups',
+ 'returnAllGroup' => true,
+ 'selected' => $values['id_group'],
+ 'return' => true,
+ 'class' => 'w50p',
],
];
diff --git a/pandora_console/include/class/CustomNetScan.class.php b/pandora_console/include/class/CustomNetScan.class.php
index 43f1e047cb..57887b1cd7 100644
--- a/pandora_console/include/class/CustomNetScan.class.php
+++ b/pandora_console/include/class/CustomNetScan.class.php
@@ -504,6 +504,7 @@ class CustomNetScan extends Wizard
'type' => 'select_groups',
'selected' => $this->task['id_group'],
'return' => true,
+ 'size' => '400px',
],
];
diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php
index e42d704f97..50c26f4e27 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 = 'PC201005';
+$build_version = 'PC201006';
$pandora_version = 'v7.0NG.749';
// Do not overwrite default timezone set if defined.
diff --git a/pandora_console/include/functions_api.php b/pandora_console/include/functions_api.php
index c1c539e8d3..6401910faa 100644
--- a/pandora_console/include/functions_api.php
+++ b/pandora_console/include/functions_api.php
@@ -1851,7 +1851,9 @@ function api_set_delete_agent($id, $thrash1, $other, $thrash3)
}
if (is_metaconsole()) {
- if (!check_acl($config['id_user'], 0, 'PM')) {
+ if (!check_acl($config['id_user'], 0, 'PM')
+ && !check_acl($config['id_user'], 0, 'AW')
+ ) {
returnError('forbidden', 'string');
return;
}
diff --git a/pandora_console/include/functions_config.php b/pandora_console/include/functions_config.php
index 3922e0ddf4..ea94b3a7da 100644
--- a/pandora_console/include/functions_config.php
+++ b/pandora_console/include/functions_config.php
@@ -925,6 +925,10 @@ function config_update_config()
$error_update[] = __('Use round corners');
}
+ if (!config_update_value('maximum_y_axis', (bool) get_parameter('maximum_y_axis'))) {
+ $error_update[] = __('Chart fit to content');
+ }
+
if (!config_update_value('show_qr_code_header', (bool) get_parameter('show_qr_code_header'))) {
$error_update[] = __('Show QR code header');
}
@@ -1772,6 +1776,10 @@ function config_process_config()
config_update_value('round_corner', false);
}
+ if (isset($config['maximum_y_axis']) === false) {
+ config_update_value('maximum_y_axis', false);
+ }
+
if (!isset($config['show_qr_code_header'])) {
config_update_value('show_qr_code_header', false);
}
diff --git a/pandora_console/include/functions_forecast.php b/pandora_console/include/functions_forecast.php
index a7e5545d55..212098e23f 100644
--- a/pandora_console/include/functions_forecast.php
+++ b/pandora_console/include/functions_forecast.php
@@ -56,7 +56,17 @@ function forecast_projection_graph(
'projection' => true,
];
- $module_data = grafico_modulo_sparse($params, $server_name);
+ if (is_metaconsole()) {
+ $id_meta = metaconsole_get_id_server($server_name);
+ $server = metaconsole_get_connection_by_id($id_meta);
+ metaconsole_connect($server);
+ }
+
+ $module_data = grafico_modulo_sparse($params);
+
+ if (is_metaconsole()) {
+ metaconsole_restore_db();
+ }
if (empty($module_data)) {
return [];
diff --git a/pandora_console/include/functions_graph.php b/pandora_console/include/functions_graph.php
index 9747cb1033..b4505df1a0 100644
--- a/pandora_console/include/functions_graph.php
+++ b/pandora_console/include/functions_graph.php
@@ -629,172 +629,177 @@ function grafico_modulo_sparse_data(
* 'graph_render' => 0,
* 'zoom' => 1,
* 'server_id' => null,
- * 'stacked' => 0.
+ * 'stacked' => 0
+ * 'maximum_y_axis' => 0.
*
* @return string html Content graphs.
*/
-function grafico_modulo_sparse($params, $server_name='')
+function grafico_modulo_sparse($params)
{
global $config;
- if (!isset($params) || !is_array($params)) {
+ if (isset($params) === false || is_array($params) === false) {
return false;
}
- if (!isset($params['period'])) {
+ if (isset($params['period']) === false) {
return false;
}
- if (!isset($params['show_events'])) {
+ if (isset($params['show_events']) === false) {
$params['show_events'] = false;
}
- if (!isset($params['width'])) {
+ if (isset($params['width']) === false) {
$params['width'] = '90%';
}
- if (!isset($params['height'])) {
+ if (isset($params['height']) === false) {
$params['height'] = 450;
}
- if (!isset($params['title'])) {
+ if (isset($params['title']) === false) {
$params['title'] = '';
}
- if (!isset($params['unit_name'])) {
+ if (isset($params['unit_name']) === false) {
$params['unit_name'] = null;
}
- if (!isset($params['show_alerts'])) {
+ if (isset($params['show_alerts']) === false) {
$params['show_alerts'] = false;
}
- if (!isset($params['date']) || !$params['date']) {
+ if (isset($params['date']) === false || !$params['date']) {
$params['date'] = get_system_time();
}
- if (!isset($params['unit'])) {
+ if (isset($params['unit']) === false) {
$params['unit'] = '';
}
- if (!isset($params['baseline'])) {
+ if (isset($params['baseline']) === false) {
$params['baseline'] = 0;
}
- if (!isset($params['return_data'])) {
+ if (isset($params['return_data']) === false) {
$params['return_data'] = 0;
}
- if (!isset($params['show_title'])) {
+ if (isset($params['show_title']) === false) {
$show_title = true;
}
- if (!isset($params['only_image'])) {
+ if (isset($params['only_image']) === false) {
$params['only_image'] = false;
}
- if (!isset($params['homeurl'])) {
+ if (isset($params['homeurl']) === false) {
$params['homeurl'] = $config['homeurl'];
}
- if (!isset($params['ttl'])) {
+ if (isset($params['ttl']) === false) {
$params['ttl'] = 1;
}
- if (!isset($params['adapt_key'])) {
+ if (isset($params['adapt_key']) === false) {
$params['adapt_key'] = '';
}
- if (!isset($params['compare'])) {
+ if (isset($params['compare']) === false) {
$params['compare'] = false;
}
- if (!isset($params['show_unknown'])) {
+ if (isset($params['show_unknown']) === false) {
$params['show_unknown'] = false;
}
- if (!isset($params['menu'])) {
+ if (isset($params['menu']) === false) {
$params['menu'] = true;
}
- if (!isset($params['show_legend'])) {
+ if (isset($params['show_legend']) === false) {
$params['show_legend'] = true;
}
- if (!isset($params['show_overview'])) {
+ if (isset($params['show_overview']) === false) {
$params['show_overview'] = true;
}
- if (!isset($params['show_export_csv'])) {
+ if (isset($params['show_export_csv']) === false) {
$params['show_export_csv'] = true;
}
- if (!isset($params['backgroundColor'])) {
+ if (isset($params['backgroundColor']) === false) {
$params['backgroundColor'] = 'white';
}
- if (!isset($params['percentil'])) {
+ if (isset($params['percentil']) === false) {
$params['percentil'] = null;
}
- if (!isset($params['dashboard'])) {
+ if (isset($params['dashboard']) === false) {
$params['dashboard'] = false;
}
- if (!isset($params['vconsole']) || $params['vconsole'] == false) {
+ if (isset($params['vconsole']) === false || $params['vconsole'] == false) {
$params['vconsole'] = false;
} else {
$params['menu'] = false;
}
- if (!isset($params['type_graph'])) {
+ if (isset($params['type_graph']) === false) {
$params['type_graph'] = $config['type_module_charts'];
}
- if (!isset($params['fullscale'])) {
+ if (isset($params['fullscale']) === false) {
$params['fullscale'] = false;
}
- if (!isset($params['id_widget_dashboard'])) {
+ if (isset($params['id_widget_dashboard']) === false) {
$params['id_widget_dashboard'] = false;
}
- if (!isset($params['force_interval'])) {
+ if (isset($params['force_interval']) === false) {
$params['force_interval'] = '';
}
- if (!isset($params['time_interval'])) {
+ if (isset($params['time_interval']) === false) {
$params['time_interval'] = 300;
}
- if (!isset($params['array_data_create'])) {
+ if (isset($params['array_data_create']) === false) {
$params['array_data_create'] = 0;
}
- if (!isset($params['return_img_base_64'])) {
+ if (isset($params['return_img_base_64']) === false) {
$params['return_img_base_64'] = false;
}
- if (!isset($params['image_treshold'])) {
+ if (isset($params['image_treshold']) === false) {
$params['image_treshold'] = false;
}
- if (!isset($params['graph_combined'])) {
+ if (isset($params['graph_combined']) === false) {
$params['graph_combined'] = false;
}
- if (!isset($params['zoom'])) {
+ if (isset($params['zoom']) === false) {
$params['zoom'] = ($config['zoom_graph']) ? $config['zoom_graph'] : 1;
}
- if (!isset($params['type_mode_graph'])) {
+ if (isset($params['type_mode_graph']) === false) {
$params['type_mode_graph'] = $config['type_mode_graph'];
if (isset($params['graph_render']) === true) {
$params['type_mode_graph'] = $params['graph_render'];
}
}
- if (!isset($params['projection'])) {
+ if (isset($params['maximum_y_axis']) === false) {
+ $params['maximum_y_axis'] = $config['maximum_y_axis'];
+ }
+
+ if (isset($params['projection']) === false) {
$params['projection'] = false;
}
@@ -802,7 +807,7 @@ function grafico_modulo_sparse($params, $server_name='')
$params['pdf'] = false;
}
- if (!isset($params['agent_module_id'])) {
+ if (isset($params['agent_module_id']) === false) {
return graph_nodata_image(
$params['width'],
$params['height'],
@@ -815,14 +820,12 @@ function grafico_modulo_sparse($params, $server_name='')
$agent_module_id = $params['agent_module_id'];
}
- if (!isset($params['stacked'])) {
+ if (isset($params['stacked']) === false) {
$params['stacked'] = 0;
}
- // TODO: Configurable.
$params['grid_color'] = '#C1C1C1';
$params['legend_color'] = '#636363';
-
$params['font'] = $config['fontpath'];
$params['font_size'] = $config['font_size'];
$params['short_data'] = $config['short_module_graph_data'];
@@ -880,14 +883,14 @@ function grafico_modulo_sparse($params, $server_name='')
}
// Format of the graph.
- if (empty($params['unit'])) {
+ if (empty($params['unit']) === true) {
$params['unit'] = $module_data['unit'];
if (modules_is_unit_macro($params['unit'])) {
$params['unit'] = '';
}
}
- if (empty($params['divisor'])) {
+ if (empty($params['divisor']) === true) {
$params['divisor'] = get_data_multiplier($params['unit']);
}
@@ -986,7 +989,7 @@ function grafico_modulo_sparse($params, $server_name='')
// Check available data.
if ($params['compare'] === 'separated') {
- if (!empty($array_data)) {
+ if (empty($array_data) === false) {
$return = area_graph(
$agent_module_id,
$array_data,
@@ -1011,7 +1014,7 @@ function grafico_modulo_sparse($params, $server_name='')
}
$return .= '
';
- if (!empty($array_data_prev)) {
+ if (empty($array_data_prev) === false) {
$series_type_array = series_type_graph_array(
$array_data_prev,
$params
@@ -1116,11 +1119,11 @@ function graphic_combined_module(
) {
global $config;
- if (!isset($params_combined['from_interface'])) {
+ if (isset($params_combined['from_interface']) === false) {
$params_combined['from_interface'] = false;
}
- if (!isset($params_combined['stacked'])) {
+ if (isset($params_combined['stacked']) === false) {
if ($params_combined['from_interface']) {
if ($config['type_interface_charts'] == 'line') {
$params_combined['stacked'] = CUSTOM_GRAPH_LINE;
@@ -1131,155 +1134,165 @@ function graphic_combined_module(
if ($params_combined['id_graph'] == 0) {
$params_combined['stacked'] = CUSTOM_GRAPH_AREA;
} else {
- $params_combined['stacked'] = db_get_row('tgraph', 'id_graph', $params_combined['id_graph']);
+ $params_combined['stacked'] = db_get_row(
+ 'tgraph',
+ 'id_graph',
+ $params_combined['id_graph']
+ );
}
}
}
$params['stacked'] = $params_combined['stacked'];
- if (!isset($params_combined['projection']) || $params_combined['projection'] == false) {
+ if (isset($params_combined['projection']) === false
+ || $params_combined['projection'] == false
+ ) {
$params_combined['projection'] = false;
} else {
$params['stacked'] = 'area';
$params['projection'] = true;
}
- if (!isset($params_combined['labels'])) {
+ if (isset($params_combined['labels']) === false) {
$params_combined['labels'] = [];
}
- if (!isset($params_combined['summatory'])) {
+ if (isset($params_combined['summatory']) === false) {
$params_combined['summatory'] = 0;
}
- if (!isset($params_combined['average'])) {
+ if (isset($params_combined['average']) === false) {
$params_combined['average'] = 0;
}
- if (!isset($params_combined['modules_series'])) {
+ if (isset($params_combined['modules_series']) === false) {
$params_combined['modules_series'] = 0;
}
- if (!isset($params_combined['return'])) {
+ if (isset($params_combined['return']) === false) {
$params_combined['return'] = 1;
}
- if (!isset($params_combined['id_graph'])) {
+ if (isset($params_combined['id_graph']) === false) {
$params_combined['id_graph'] = 0;
}
- if (!isset($params_combined['type_report'])) {
+ if (isset($params_combined['type_report']) === false) {
$params_combined['type_report'] = '';
}
- if (!isset($params['percentil'])) {
+ if (isset($params['percentil']) === false) {
$params_combined['percentil'] = null;
} else {
$params_combined['percentil'] = $params['percentil'];
}
- if (!isset($params['period'])) {
+ if (isset($params['period']) === false) {
return false;
}
- if (!isset($params['width'])) {
+ if (isset($params['width']) === false) {
$params['width'] = '90%';
}
- if (!isset($params['height'])) {
+ if (isset($params['height']) === false) {
$params['height'] = 450;
}
- if (!isset($params['title'])) {
+ if (isset($params['title']) === false) {
$params['title'] = '';
}
- if (!isset($params['unit_name'])) {
+ if (isset($params['unit_name']) === false) {
$params['unit_name'] = null;
}
- if (!isset($params['show_alerts'])) {
+ if (isset($params['show_alerts']) === false) {
$params['show_alerts'] = false;
}
- if (!isset($params['date']) || !$params['date']) {
+ if (isset($params['date']) === false || !$params['date']) {
$params['date'] = get_system_time();
}
- if (!isset($params['only_image'])) {
+ if (isset($params['only_image']) === false) {
$params['only_image'] = false;
}
- if (!isset($params['ttl'])) {
+ if (isset($params['ttl']) === false) {
$params['ttl'] = 1;
}
- if (!isset($params['backgroundColor'])) {
+ if (isset($params['backgroundColor']) === false) {
$params['backgroundColor'] = 'white';
}
- if (!isset($params['dashboard'])) {
+ if (isset($params['dashboard']) === false) {
$params['dashboard'] = false;
}
- if (!isset($params['menu']) || $params['only_image']) {
+ if (isset($params['menu']) === false
+ || $params['only_image']
+ ) {
$params['menu'] = true;
} else {
$params['menu'] = false;
}
- if (!isset($params['vconsole']) || $params['vconsole'] == false) {
+ if (isset($params['vconsole']) === false
+ || $params['vconsole'] == false
+ ) {
$params['vconsole'] = false;
} else {
$params['menu'] = false;
}
- if (!isset($params['type_graph'])) {
+ if (isset($params['type_graph']) === false) {
$params['type_graph'] = $config['type_module_charts'];
}
- if (!isset($params['percentil'])) {
+ if (isset($params['percentil']) === false) {
$params['percentil'] = null;
}
- if (!isset($params['fullscale'])) {
+ if (isset($params['fullscale']) === false) {
$params['fullscale'] = false;
}
- if (!isset($params['id_widget_dashboard'])) {
+ if (isset($params['id_widget_dashboard']) === false) {
$params['id_widget_dashboard'] = false;
}
- if (!isset($params['homeurl'])) {
+ if (isset($params['homeurl']) === false) {
$params['homeurl'] = ui_get_full_url(false, false, false, false);
}
- if (!isset($params['show_legend'])) {
+ if (isset($params['show_legend']) === false) {
$params['show_legend'] = true;
}
- if (!isset($params['show_overview'])) {
+ if (isset($params['show_overview']) === false) {
$params['show_overview'] = true;
}
- if (!isset($params['show_export_csv'])) {
+ if (isset($params['show_export_csv']) === false) {
$params['show_export_csv'] = true;
}
- if (!isset($params['return_img_base_64'])) {
+ if (isset($params['return_img_base_64']) === false) {
$params['return_img_base_64'] = false;
}
- if (!isset($params['image_treshold'])) {
+ if (isset($params['image_treshold']) === false) {
$params['image_treshold'] = false;
}
- if (!isset($params['show_unknown'])) {
+ if (isset($params['show_unknown']) === false) {
$params['show_unknown'] = false;
}
- if (!isset($params['type_mode_graph'])) {
+ if (isset($params['type_mode_graph']) === false) {
$params['type_mode_graph'] = 0;
if (isset($params['graph_render']) === true) {
$params['type_mode_graph'] = $params['graph_render'];
@@ -1293,6 +1306,10 @@ function graphic_combined_module(
$params_combined['fullscale'] = $params['fullscale'];
}
+ if (isset($params['maximum_y_axis']) === false) {
+ $params['maximum_y_axis'] = $config['maximum_y_axis'];
+ }
+
$params['graph_combined'] = true;
$params_combined['graph_combined'] = true;
@@ -1305,11 +1322,10 @@ function graphic_combined_module(
);
}
- if (!isset($params['zoom'])) {
+ if (isset($params['zoom']) === false) {
$params['zoom'] = 1;
}
- // TODO: Configurable.
$params['grid_color'] = '#C1C1C1';
$params['legend_color'] = '#636363';
@@ -1454,23 +1470,23 @@ function graphic_combined_module(
$params_combined['modules_id'] = $modules;
}
- if (isset($summatory)) {
+ if (isset($summatory) === true) {
$params_combined['summatory'] = $summatory;
}
- if (isset($average)) {
+ if (isset($average) === true) {
$params_combined['average'] = $average;
}
- if (isset($modules_series)) {
+ if (isset($modules_series) === true) {
$params_combined['modules_series'] = $modules_series;
}
- if (isset($labels)) {
+ if (isset($labels) === true) {
$params_combined['labels'] = $labels;
}
- if (isset($weights)) {
+ if (isset($weights) === true) {
$params_combined['weight_list'] = $weights;
}
@@ -1660,7 +1676,7 @@ function graphic_combined_module(
}
}
- if (empty($array_data)) {
+ if (empty($array_data) === true) {
if ($params_combined['return']) {
return graph_nodata_image($width, $height);
}
@@ -4392,7 +4408,7 @@ function fullscale_data(
// Avg count total.
$count_data_total++;
- if ($type_mode_graph && !$params['baseline']) {
+ if (!$params['baseline']) {
// MIN.
// max min.
if ($min_value >= $min_value_max
@@ -4460,7 +4476,7 @@ function fullscale_data(
}
}
- if ($type_mode_graph && !$params['baseline']) {
+ if (!$params['baseline']) {
if ((int) $type_mode_graph === 1 || (int) $type_mode_graph === 3) {
$data['min'.$series_suffix]['min'] = $min_value_min;
$data['min'.$series_suffix]['max'] = $min_value_max;
diff --git a/pandora_console/include/functions_groups.php b/pandora_console/include/functions_groups.php
index cc1a8b6424..b6c1a5e6c9 100644
--- a/pandora_console/include/functions_groups.php
+++ b/pandora_console/include/functions_groups.php
@@ -341,7 +341,7 @@ function groups_get_children($parent, $ignorePropagate=false)
/**
- * XXX: This is not working. Expects 'propagate' on CHILD not on PARENT!!!
+ * @deprecated This is not working. Expects 'propagate' on CHILD not on PARENT!!!
*
* Return a array of id_group of childrens (to branches down)
*
@@ -575,14 +575,18 @@ function groups_get_id_recursive($id_parent, $all=false)
function groups_flatten_tree_groups($tree, $deep)
{
- foreach ($tree as $key => $group) {
- $return[$key] = $group;
- unset($return[$key]['branch']);
- $return[$key]['deep'] = $deep;
+ if (is_array($tree) === true) {
+ foreach ($tree as $key => $group) {
+ $return[$key] = $group;
+ unset($return[$key]['branch']);
+ $return[$key]['deep'] = $deep;
- if (!empty($group['branch'])) {
- $return = ($return + groups_flatten_tree_groups($group['branch'], ($deep + 1)));
+ if (empty($group['branch']) === false) {
+ $return = ($return + groups_flatten_tree_groups($group['branch'], ($deep + 1)));
+ }
}
+ } else {
+ $return = [];
}
return $return;
@@ -618,7 +622,7 @@ function groups_get_groups_tree_recursive($groups, $trash=0, $trash2=0)
$tree[$group['parent']]['branch'][$key] = &$tree[$key];
}
- // Depends on the All group we give different format
+ // Depends on the All group we give different format.
if (isset($groups[0])) {
$tree = [$tree[0]];
} else {
diff --git a/pandora_console/include/functions_html.php b/pandora_console/include/functions_html.php
index 6b66357652..6dedb85927 100644
--- a/pandora_console/include/functions_html.php
+++ b/pandora_console/include/functions_html.php
@@ -410,25 +410,32 @@ function html_print_select_style($fields, $name, $selected='', $style='', $scrip
/**
- * Prints the groups of user of fields in a popup menu of a form.
+ * Print or return selector for groups.
*
- * @param string User id
- * @param string The privilege to evaluate
- * @param boolean $returnAllGroup Flag the return group, by default true.
- * @param boolean $returnAllColumns Flag to return all columns of groups.
- * @param array Array with dropdown values. Example: $fields["value"] = "label"
- * @param string Select form name
- * @param variant Current selected value. Can be a single value or an
- * array of selected values (in combination with multiple)
- * @param string Javascript onChange code.
- * @param string Label when nothing is selected.
- * @param variant Value when nothing is selected
- * @param bool Whether to return an output string or echo now (optional, echo by default).
- * @param bool Set the input to allow multiple selections (optional, single selection by default).
- * @param bool Whether to sort the options or not (optional, unsorted by default).
- * @param string $style The string of style.
- * @param integer $id_group The id of node that must do not show the children and own.
- * @param string $keys_field The field of the group used in the array keys. By default ID
+ * @param string $id_user User id.
+ * @param string $privilege The privilege to evaluate.
+ * @param boolean $returnAllGroup Flag the return group, (true).
+ * @param boolean $name Name of input field.
+ * @param array $selected Array with dropdown values. Example:
+ * $fields["value"] = "label".
+ * @param string $script Javascript onChange code.
+ * @param mixed $nothing Label when nothing is selected.
+ * @param array $nothing_value Value when nothing is selected.
+ * @param string $return Return string or dump to output.
+ * @param boolean $multiple Enable multiple select.
+ * @param mixed $sort Sort values or not (default false).
+ * @param boolean $class CSS classes to apply.
+ * @param boolean $disabled Disabled or enabled.
+ * @param boolean $style CSS inline style.
+ * @param string $option_style CSS inline style in array format.
+ * @param array $id_group Groups to be manually added.
+ * @param string $keys_field Field to be used as array key, (id).
+ * @param boolean $strict_user Strict.
+ * @param array $delete_groups Remove groups from select.
+ * @param array $include_groups Add groups to select.
+ * @param string $size Style, size (width) of element.
+ * @param boolean $simple_multiple_options Discovery simple multiple inputs.
+ * @param boolean $required Required input.
*
* @return string HTML code if return parameter is true.
*/
@@ -436,14 +443,14 @@ function html_print_select_groups(
$id_user=false,
$privilege='AR',
$returnAllGroup=true,
- $name,
+ $name=null,
$selected='',
$script='',
$nothing='',
$nothing_value=0,
$return=false,
$multiple=false,
- $sort=true,
+ $sort=false,
$class='',
$disabled=false,
$style=false,
@@ -454,39 +461,68 @@ function html_print_select_groups(
$delete_groups=false,
$include_groups=false,
$size=false,
- $simple_multiple_options=false
+ $simple_multiple_options=false,
+ $required=false
) {
- global $config;
+ $output = '';
- $fields = users_get_groups_for_select(
- $id_user,
- $privilege,
- $returnAllGroup,
- true,
- $id_group,
- $keys_field
- );
+ if (is_ajax()) {
+ $output .= '';
- if ($delete_groups && is_array($delete_groups)) {
- foreach ($delete_groups as $value) {
- unset($fields[$value]);
+ $output .= '
';
+ } else {
+ ui_require_css_file('select2.min');
+ ui_require_javascript_file('select2.min');
+ }
+
+ if ($name === null) {
+ static $idcounter = [];
+ if (isset($idcounter[$name]) === true) {
+ $idcounter[$name]++;
+ } else {
+ $idcounter[$name] = 0;
+ }
+
+ $name = 'group_select'.$idcounter[$name];
+ }
+
+ $fields = [];
+ // Preload selector.
+ if (is_array($selected) === false) {
+ if (empty($selected) === false) {
+ $fields = [ $selected => groups_get_name($selected) ];
+ } else if ($returnAllGroup === true && $multiple === false) {
+ $fields = [ $selected => groups_get_name(null, true) ];
+ }
+ } else {
+ foreach ($selected as $k) {
+ $fields[$k] = groups_get_name($k);
}
}
- if (is_array($include_groups)) {
- $field = [];
- foreach ($include_groups as $value) {
- $field[$value] = $fields[$value];
- }
-
- $fields = array_intersect($fields, $field);
+ if (is_array($delete_groups) === true) {
+ $json_exclusions = json_encode($delete_groups);
}
- if ($strict_user) {
- $fields = users_get_strict_mode_groups($config['id_user'], $returnAllGroup);
+ if (is_array($include_groups) === true) {
+ $json_inclusions = json_encode($include_groups);
}
- $output = html_print_select(
+ $output .= html_print_select(
$fields,
$name,
$selected,
@@ -495,7 +531,7 @@ function html_print_select_groups(
$nothing_value,
$return,
$multiple,
- false,
+ $sort,
$class,
$disabled,
$style,
@@ -504,9 +540,82 @@ function html_print_select_groups(
false,
'',
false,
- $simple_multiple_options
+ $simple_multiple_options,
+ $required
);
+ if (empty($size) === true) {
+ $size = '100%';
+ }
+
+ ob_start();
+ ?>
+
+
+
+
+ ';
+ if ($required) {
+ $required = 'required';
+ }
+
+ $output .= '
';
if ($nothing !== false) {
if ($nothing != '' || empty($fields)) {
@@ -4271,7 +4385,8 @@ function html_print_input($data, $wrapper='div', $input_only=false)
((isset($data['delete_groups']) === true) ? $data['delete_groups'] : false),
((isset($data['include_groups']) === true) ? $data['include_groups'] : false),
((isset($data['size']) === true) ? $data['size'] : false),
- ((isset($data['simple_multiple_options']) === true) ? $data['simple_multiple_options'] : false)
+ ((isset($data['simple_multiple_options']) === true) ? $data['simple_multiple_options'] : false),
+ ((isset($data['required']) === true) ? $data['required'] : false)
);
break;
diff --git a/pandora_console/include/functions_profile.php b/pandora_console/include/functions_profile.php
index d9b8c574f9..4406fd72b6 100644
--- a/pandora_console/include/functions_profile.php
+++ b/pandora_console/include/functions_profile.php
@@ -323,7 +323,7 @@ function profile_print_profile_table($id)
$data['group'] = html_print_select_groups(
$config['id_user'],
'UM',
- users_is_admin($config['id_user']),
+ users_can_manage_group_all('UM'),
'assign_group',
-1,
'',
diff --git a/pandora_console/include/functions_users.php b/pandora_console/include/functions_users.php
index 6bb1781be8..7b310889ac 100755
--- a/pandora_console/include/functions_users.php
+++ b/pandora_console/include/functions_users.php
@@ -116,17 +116,30 @@ function users_get_all_model_groups()
*
* @return array A list of the groups the user has certain privileges.
*/
-function users_get_groups_for_select($id_user, $privilege='AR', $returnAllGroup=true, $returnAllColumns=false, $id_groups=null, $keys_field='id_grupo')
-{
+function users_get_groups_for_select(
+ $id_user,
+ $privilege='AR',
+ $returnAllGroup=true,
+ $returnAllColumns=false,
+ $id_groups=null,
+ $keys_field='id_grupo',
+ $ajax_format=false
+) {
if ($id_groups === false) {
$id_groups = null;
}
- $user_groups = users_get_groups($id_user, $privilege, $returnAllGroup, $returnAllColumns, null);
+ $user_groups = users_get_groups(
+ $id_user,
+ $privilege,
+ $returnAllGroup,
+ $returnAllColumns,
+ null
+ );
if ($id_groups !== null) {
- $childrens = groups_get_childrens($id_groups);
- foreach ($childrens as $child) {
+ $children = groups_get_children($id_groups);
+ foreach ($children as $child) {
unset($user_groups[$child['id_grupo']]);
}
@@ -136,7 +149,7 @@ function users_get_groups_for_select($id_user, $privilege='AR', $returnAllGroup=
if (empty($user_groups)) {
$user_groups_tree = [];
} else {
- // First group it's needed to retrieve its parent group
+ // First group it's needed to retrieve its parent group.
$first_group = array_slice($user_groups, 0, 1);
$first_group = reset($first_group);
$parent_group = $first_group['parent'];
@@ -149,13 +162,28 @@ function users_get_groups_for_select($id_user, $privilege='AR', $returnAllGroup=
foreach ($user_groups_tree as $group) {
$groupName = ui_print_truncate_text($group['nombre'], GENERIC_SIZE_TEXT, false, true, false);
- $fields[$group[$keys_field]] = str_repeat(' ', $group['deep']).$groupName;
+ if ($ajax_format === false) {
+ $fields[$group[$keys_field]] = str_repeat(' ', $group['deep']).$groupName;
+ } else {
+ $tmp['id'] = $group[$keys_field];
+ $tmp['text'] = io_safe_output($groupName);
+ $tmp['level'] = $group['deep'];
+ $fields[] = $tmp;
+ }
}
return $fields;
}
+/**
+ * Extract ancestors for given group.
+ *
+ * @param integer $group_id Target group.
+ * @param array $groups All groups.
+ *
+ * @return array
+ */
function get_group_ancestors($group_id, $groups)
{
if ($group_id == 0) {
@@ -249,13 +277,14 @@ function groups_combine_acl($acl_group_a, $acl_group_b)
/**
* Get all the groups a user has reading privileges.
*
- * @param string $id_user User id
+ * @param string $id_user User id.
* @param string $privilege The privilege to evaluate, and it is false then no check ACL.
* @param boolean $returnAllGroup Flag the return group, by default true.
* @param boolean $returnAllColumns Flag to return all columns of groups.
* @param array $id_groups The list of group to scan to bottom child. By default null.
- * @param string $keys_field The field of the group used in the array keys. By default ID
- * @param boolean $cache Set it to false to not use cache
+ * @param string $keys_field The field of the group used in the array keys. By default ID.
+ * @param boolean $cache Set it to false to not use cache.
+ * @param string $term Return only groups matching keyword '$term'.
*
* @return array A list of the groups the user has certain privileges.
*/
@@ -266,13 +295,14 @@ function users_get_groups(
$returnAllColumns=false,
$id_groups=null,
$keys_field='id_grupo',
- $cache=true
+ $cache=true,
+ $search=''
) {
static $group_cache = [];
// Added users_group_cache to avoid unnecessary proccess on massive calls...
static $users_group_cache = [];
- $users_group_cache_key = $id_user.'|'.$privilege.'|'.$returnAllGroup.'|'.$returnAllColumns;
+ $users_group_cache_key = $id_user.'|'.$privilege.'|'.$returnAllGroup.'|'.$returnAllColumns.'|'.$search;
if (empty($id_user)) {
global $config;
@@ -284,24 +314,45 @@ function users_get_groups(
}
// Check the group cache first.
- if (array_key_exists($id_user, $group_cache) && $cache) {
- $forest_acl = $group_cache[$id_user];
+ if (array_key_exists($users_group_cache_key, $group_cache) && $cache) {
+ $forest_acl = $group_cache[$users_group_cache_key];
} else {
// Admin.
if (is_user_admin($id_user)) {
- $forest_acl = db_get_all_rows_sql('SELECT * FROM tgrupo ORDER BY nombre');
+ if (empty($search) === false) {
+ $filter = sprintf(
+ ' WHERE lower(tgrupo.nombre) like lower("%%%s%%")',
+ $search
+ );
+ }
+
+ $sql = sprintf(
+ 'SELECT * FROM tgrupo %s ORDER BY nombre',
+ $filter
+ );
+
+ $forest_acl = db_get_all_rows_sql($sql);
}
+
// Per-group permissions.
else {
$query = 'SELECT * FROM tgrupo ORDER BY nombre';
$raw_groups = db_get_all_rows_sql($query);
+ if (empty($search) === false) {
+ $filter = sprintf(
+ ' AND lower(tgrupo.nombre) like lower("%%%s%%")',
+ $search
+ );
+ }
+
$query = sprintf(
"SELECT tgrupo.*, tperfil.*, tusuario_perfil.tags, tusuario_perfil.no_hierarchy FROM tgrupo, tusuario_perfil, tperfil
WHERE (tgrupo.id_grupo = tusuario_perfil.id_grupo OR tusuario_perfil.id_grupo = 0)
AND tusuario_perfil.id_perfil = tperfil.id_perfil
- AND tusuario_perfil.id_usuario = '%s' ORDER BY nombre",
- $id_user
+ AND tusuario_perfil.id_usuario = '%s' %s ORDER BY nombre",
+ $id_user,
+ $filter
);
$raw_forest = db_get_all_rows_sql($query);
if ($raw_forest === false) {
@@ -309,7 +360,6 @@ function users_get_groups(
}
foreach ($raw_forest as $g) {
- // XXX, following code must be remade (TAG)
users_get_explode_tags($g);
if (!isset($forest_acl[$g['id_grupo']])) {
@@ -354,7 +404,7 @@ function users_get_groups(
}
// Update the group cache.
- $group_cache[$id_user] = $forest_acl;
+ $group_cache[$users_group_cache_key] = $forest_acl;
}
$user_groups = [];
@@ -620,6 +670,13 @@ function users_get_strict_mode_groups($id_user, $return_group_all)
}
+/**
+ * Use carefully, it consumes a lot of memory.
+ *
+ * @param array $group Group array.
+ *
+ * @return void
+ */
function users_get_explode_tags(&$group)
{
if (empty($group['tags'])) {
diff --git a/pandora_console/include/graphs/flot/pandora.flot.js b/pandora_console/include/graphs/flot/pandora.flot.js
index 6cd5e482c9..8f5587d917 100644
--- a/pandora_console/include/graphs/flot/pandora.flot.js
+++ b/pandora_console/include/graphs/flot/pandora.flot.js
@@ -537,8 +537,6 @@ $.fn.VUseTooltip = function() {
var color = item.series.color;
- //console.log(item.series.xaxis.ticks[x].label);
-
/*
"" +
item.series.label +
@@ -1003,6 +1001,7 @@ function pandoraFlotArea(
var update_legend = {};
var force_integer = 0;
var divisor = params.divisor;
+ var maximum_y_axis = params.maximum_y_axis;
if (typeof divisor === "undefined") {
divisor = 1000;
@@ -1896,6 +1895,13 @@ function pandoraFlotArea(
fill_color = "green";
}
+ if (typeof maximum_y_axis !== "undefined" && maximum_y_axis != 0) {
+ maximum_y_axis =
+ parseInt(value.max) > parseInt(maximum_y_axis)
+ ? parseInt(value.max)
+ : parseInt(maximum_y_axis);
+ }
+
switch (series_type[index]) {
case "area":
line_show = true;
@@ -2044,6 +2050,10 @@ function pandoraFlotArea(
}
};
+ if (typeof maximum_y_axis !== "undefined" && maximum_y_axis != 0) {
+ options.yaxis.max = maximum_y_axis;
+ }
+
if (vconsole) {
options.grid["hoverable"] = false;
options.grid["clickable"] = false;
diff --git a/pandora_console/include/javascript/i18n/af.js b/pandora_console/include/javascript/i18n/af.js
new file mode 100644
index 0000000000..32e5ac7de8
--- /dev/null
+++ b/pandora_console/include/javascript/i18n/af.js
@@ -0,0 +1,3 @@
+/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/af",[],function(){return{errorLoading:function(){return"Die resultate kon nie gelaai word nie."},inputTooLong:function(e){var n=e.input.length-e.maximum,r="Verwyders asseblief "+n+" character";return 1!=n&&(r+="s"),r},inputTooShort:function(e){return"Voer asseblief "+(e.minimum-e.input.length)+" of meer karakters"},loadingMore:function(){return"Meer resultate word gelaai…"},maximumSelected:function(e){var n="Kies asseblief net "+e.maximum+" item";return 1!=e.maximum&&(n+="s"),n},noResults:function(){return"Geen resultate gevind"},searching:function(){return"Besig…"},removeAllItems:function(){return"Verwyder alle items"}}}),e.define,e.require}();
\ No newline at end of file
diff --git a/pandora_console/include/javascript/i18n/ar.js b/pandora_console/include/javascript/i18n/ar.js
new file mode 100644
index 0000000000..64e1caad34
--- /dev/null
+++ b/pandora_console/include/javascript/i18n/ar.js
@@ -0,0 +1,3 @@
+/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/ar",[],function(){return{errorLoading:function(){return"لا يمكن تحميل النتائج"},inputTooLong:function(n){return"الرجاء حذف "+(n.input.length-n.maximum)+" عناصر"},inputTooShort:function(n){return"الرجاء إضافة "+(n.minimum-n.input.length)+" عناصر"},loadingMore:function(){return"جاري تحميل نتائج إضافية..."},maximumSelected:function(n){return"تستطيع إختيار "+n.maximum+" بنود فقط"},noResults:function(){return"لم يتم العثور على أي نتائج"},searching:function(){return"جاري البحث…"},removeAllItems:function(){return"قم بإزالة كل العناصر"}}}),n.define,n.require}();
\ No newline at end of file
diff --git a/pandora_console/include/javascript/i18n/az.js b/pandora_console/include/javascript/i18n/az.js
new file mode 100644
index 0000000000..1d52c260f2
--- /dev/null
+++ b/pandora_console/include/javascript/i18n/az.js
@@ -0,0 +1,3 @@
+/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/az",[],function(){return{inputTooLong:function(n){return n.input.length-n.maximum+" simvol silin"},inputTooShort:function(n){return n.minimum-n.input.length+" simvol daxil edin"},loadingMore:function(){return"Daha çox nəticə yüklənir…"},maximumSelected:function(n){return"Sadəcə "+n.maximum+" element seçə bilərsiniz"},noResults:function(){return"Nəticə tapılmadı"},searching:function(){return"Axtarılır…"},removeAllItems:function(){return"Bütün elementləri sil"}}}),n.define,n.require}();
\ No newline at end of file
diff --git a/pandora_console/include/javascript/i18n/bg.js b/pandora_console/include/javascript/i18n/bg.js
new file mode 100644
index 0000000000..73b730a705
--- /dev/null
+++ b/pandora_console/include/javascript/i18n/bg.js
@@ -0,0 +1,3 @@
+/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/bg",[],function(){return{inputTooLong:function(n){var e=n.input.length-n.maximum,u="Моля въведете с "+e+" по-малко символ";return e>1&&(u+="a"),u},inputTooShort:function(n){var e=n.minimum-n.input.length,u="Моля въведете още "+e+" символ";return e>1&&(u+="a"),u},loadingMore:function(){return"Зареждат се още…"},maximumSelected:function(n){var e="Можете да направите до "+n.maximum+" ";return n.maximum>1?e+="избора":e+="избор",e},noResults:function(){return"Няма намерени съвпадения"},searching:function(){return"Търсене…"},removeAllItems:function(){return"Премахнете всички елементи"}}}),n.define,n.require}();
\ No newline at end of file
diff --git a/pandora_console/include/javascript/i18n/bn.js b/pandora_console/include/javascript/i18n/bn.js
new file mode 100644
index 0000000000..2d17b9d8e0
--- /dev/null
+++ b/pandora_console/include/javascript/i18n/bn.js
@@ -0,0 +1,3 @@
+/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/bn",[],function(){return{errorLoading:function(){return"ফলাফলগুলি লোড করা যায়নি।"},inputTooLong:function(n){var e=n.input.length-n.maximum,u="অনুগ্রহ করে "+e+" টি অক্ষর মুছে দিন।";return 1!=e&&(u="অনুগ্রহ করে "+e+" টি অক্ষর মুছে দিন।"),u},inputTooShort:function(n){return n.minimum-n.input.length+" টি অক্ষর অথবা অধিক অক্ষর লিখুন।"},loadingMore:function(){return"আরো ফলাফল লোড হচ্ছে ..."},maximumSelected:function(n){var e=n.maximum+" টি আইটেম নির্বাচন করতে পারবেন।";return 1!=n.maximum&&(e=n.maximum+" টি আইটেম নির্বাচন করতে পারবেন।"),e},noResults:function(){return"কোন ফলাফল পাওয়া যায়নি।"},searching:function(){return"অনুসন্ধান করা হচ্ছে ..."}}}),n.define,n.require}();
\ No newline at end of file
diff --git a/pandora_console/include/javascript/i18n/bs.js b/pandora_console/include/javascript/i18n/bs.js
new file mode 100644
index 0000000000..46b084d758
--- /dev/null
+++ b/pandora_console/include/javascript/i18n/bs.js
@@ -0,0 +1,3 @@
+/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/bs",[],function(){function e(e,n,r,t){return e%10==1&&e%100!=11?n:e%10>=2&&e%10<=4&&(e%100<12||e%100>14)?r:t}return{errorLoading:function(){return"Preuzimanje nije uspijelo."},inputTooLong:function(n){var r=n.input.length-n.maximum,t="Obrišite "+r+" simbol";return t+=e(r,"","a","a")},inputTooShort:function(n){var r=n.minimum-n.input.length,t="Ukucajte bar još "+r+" simbol";return t+=e(r,"","a","a")},loadingMore:function(){return"Preuzimanje još rezultata…"},maximumSelected:function(n){var r="Možete izabrati samo "+n.maximum+" stavk";return r+=e(n.maximum,"u","e","i")},noResults:function(){return"Ništa nije pronađeno"},searching:function(){return"Pretraga…"},removeAllItems:function(){return"Uklonite sve stavke"}}}),e.define,e.require}();
\ No newline at end of file
diff --git a/pandora_console/include/javascript/i18n/ca.js b/pandora_console/include/javascript/i18n/ca.js
new file mode 100644
index 0000000000..82dbbb7a21
--- /dev/null
+++ b/pandora_console/include/javascript/i18n/ca.js
@@ -0,0 +1,3 @@
+/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/ca",[],function(){return{errorLoading:function(){return"La càrrega ha fallat"},inputTooLong:function(e){var n=e.input.length-e.maximum,r="Si us plau, elimina "+n+" car";return r+=1==n?"àcter":"àcters"},inputTooShort:function(e){var n=e.minimum-e.input.length,r="Si us plau, introdueix "+n+" car";return r+=1==n?"àcter":"àcters"},loadingMore:function(){return"Carregant més resultats…"},maximumSelected:function(e){var n="Només es pot seleccionar "+e.maximum+" element";return 1!=e.maximum&&(n+="s"),n},noResults:function(){return"No s'han trobat resultats"},searching:function(){return"Cercant…"},removeAllItems:function(){return"Treu tots els elements"}}}),e.define,e.require}();
\ No newline at end of file
diff --git a/pandora_console/include/javascript/i18n/cs.js b/pandora_console/include/javascript/i18n/cs.js
new file mode 100644
index 0000000000..7116d6c1df
--- /dev/null
+++ b/pandora_console/include/javascript/i18n/cs.js
@@ -0,0 +1,3 @@
+/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/cs",[],function(){function e(e,n){switch(e){case 2:return n?"dva":"dvě";case 3:return"tři";case 4:return"čtyři"}return""}return{errorLoading:function(){return"Výsledky nemohly být načteny."},inputTooLong:function(n){var t=n.input.length-n.maximum;return 1==t?"Prosím, zadejte o jeden znak méně.":t<=4?"Prosím, zadejte o "+e(t,!0)+" znaky méně.":"Prosím, zadejte o "+t+" znaků méně."},inputTooShort:function(n){var t=n.minimum-n.input.length;return 1==t?"Prosím, zadejte ještě jeden znak.":t<=4?"Prosím, zadejte ještě další "+e(t,!0)+" znaky.":"Prosím, zadejte ještě dalších "+t+" znaků."},loadingMore:function(){return"Načítají se další výsledky…"},maximumSelected:function(n){var t=n.maximum;return 1==t?"Můžete zvolit jen jednu položku.":t<=4?"Můžete zvolit maximálně "+e(t,!1)+" položky.":"Můžete zvolit maximálně "+t+" položek."},noResults:function(){return"Nenalezeny žádné položky."},searching:function(){return"Vyhledávání…"},removeAllItems:function(){return"Odstraňte všechny položky"}}}),e.define,e.require}();
\ No newline at end of file
diff --git a/pandora_console/include/javascript/i18n/da.js b/pandora_console/include/javascript/i18n/da.js
new file mode 100644
index 0000000000..cda32c34aa
--- /dev/null
+++ b/pandora_console/include/javascript/i18n/da.js
@@ -0,0 +1,3 @@
+/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/da",[],function(){return{errorLoading:function(){return"Resultaterne kunne ikke indlæses."},inputTooLong:function(e){return"Angiv venligst "+(e.input.length-e.maximum)+" tegn mindre"},inputTooShort:function(e){return"Angiv venligst "+(e.minimum-e.input.length)+" tegn mere"},loadingMore:function(){return"Indlæser flere resultater…"},maximumSelected:function(e){var n="Du kan kun vælge "+e.maximum+" emne";return 1!=e.maximum&&(n+="r"),n},noResults:function(){return"Ingen resultater fundet"},searching:function(){return"Søger…"},removeAllItems:function(){return"Fjern alle elementer"}}}),e.define,e.require}();
\ No newline at end of file
diff --git a/pandora_console/include/javascript/i18n/de.js b/pandora_console/include/javascript/i18n/de.js
new file mode 100644
index 0000000000..c2e61e5800
--- /dev/null
+++ b/pandora_console/include/javascript/i18n/de.js
@@ -0,0 +1,3 @@
+/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/de",[],function(){return{errorLoading:function(){return"Die Ergebnisse konnten nicht geladen werden."},inputTooLong:function(e){return"Bitte "+(e.input.length-e.maximum)+" Zeichen weniger eingeben"},inputTooShort:function(e){return"Bitte "+(e.minimum-e.input.length)+" Zeichen mehr eingeben"},loadingMore:function(){return"Lade mehr Ergebnisse…"},maximumSelected:function(e){var n="Sie können nur "+e.maximum+" Element";return 1!=e.maximum&&(n+="e"),n+=" auswählen"},noResults:function(){return"Keine Übereinstimmungen gefunden"},searching:function(){return"Suche…"},removeAllItems:function(){return"Entferne alle Elemente"}}}),e.define,e.require}();
\ No newline at end of file
diff --git a/pandora_console/include/javascript/i18n/dsb.js b/pandora_console/include/javascript/i18n/dsb.js
new file mode 100644
index 0000000000..02f283abad
--- /dev/null
+++ b/pandora_console/include/javascript/i18n/dsb.js
@@ -0,0 +1,3 @@
+/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/dsb",[],function(){var n=["znamuško","znamušce","znamuška","znamuškow"],e=["zapisk","zapiska","zapiski","zapiskow"],u=function(n,e){return 1===n?e[0]:2===n?e[1]:n>2&&n<=4?e[2]:n>=5?e[3]:void 0};return{errorLoading:function(){return"Wuslědki njejsu se dali zacytaś."},inputTooLong:function(e){var a=e.input.length-e.maximum;return"Pšosym lašuj "+a+" "+u(a,n)},inputTooShort:function(e){var a=e.minimum-e.input.length;return"Pšosym zapódaj nanejmjenjej "+a+" "+u(a,n)},loadingMore:function(){return"Dalšne wuslědki se zacytaju…"},maximumSelected:function(n){return"Móžoš jano "+n.maximum+" "+u(n.maximum,e)+"wubraś."},noResults:function(){return"Žedne wuslědki namakane"},searching:function(){return"Pyta se…"},removeAllItems:function(){return"Remove all items"}}}),n.define,n.require}();
\ No newline at end of file
diff --git a/pandora_console/include/javascript/i18n/el.js b/pandora_console/include/javascript/i18n/el.js
new file mode 100644
index 0000000000..d4922a1df5
--- /dev/null
+++ b/pandora_console/include/javascript/i18n/el.js
@@ -0,0 +1,3 @@
+/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/el",[],function(){return{errorLoading:function(){return"Τα αποτελέσματα δεν μπόρεσαν να φορτώσουν."},inputTooLong:function(n){var e=n.input.length-n.maximum,u="Παρακαλώ διαγράψτε "+e+" χαρακτήρ";return 1==e&&(u+="α"),1!=e&&(u+="ες"),u},inputTooShort:function(n){return"Παρακαλώ συμπληρώστε "+(n.minimum-n.input.length)+" ή περισσότερους χαρακτήρες"},loadingMore:function(){return"Φόρτωση περισσότερων αποτελεσμάτων…"},maximumSelected:function(n){var e="Μπορείτε να επιλέξετε μόνο "+n.maximum+" επιλογ";return 1==n.maximum&&(e+="ή"),1!=n.maximum&&(e+="ές"),e},noResults:function(){return"Δεν βρέθηκαν αποτελέσματα"},searching:function(){return"Αναζήτηση…"},removeAllItems:function(){return"Καταργήστε όλα τα στοιχεία"}}}),n.define,n.require}();
\ No newline at end of file
diff --git a/pandora_console/include/javascript/i18n/en.js b/pandora_console/include/javascript/i18n/en.js
new file mode 100644
index 0000000000..3b19285734
--- /dev/null
+++ b/pandora_console/include/javascript/i18n/en.js
@@ -0,0 +1,3 @@
+/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(e){var n=e.input.length-e.maximum,r="Please delete "+n+" character";return 1!=n&&(r+="s"),r},inputTooShort:function(e){return"Please enter "+(e.minimum-e.input.length)+" or more characters"},loadingMore:function(){return"Loading more results…"},maximumSelected:function(e){var n="You can only select "+e.maximum+" item";return 1!=e.maximum&&(n+="s"),n},noResults:function(){return"No results found"},searching:function(){return"Searching…"},removeAllItems:function(){return"Remove all items"}}}),e.define,e.require}();
\ No newline at end of file
diff --git a/pandora_console/include/javascript/i18n/es.js b/pandora_console/include/javascript/i18n/es.js
new file mode 100644
index 0000000000..68afd6d259
--- /dev/null
+++ b/pandora_console/include/javascript/i18n/es.js
@@ -0,0 +1,3 @@
+/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/es",[],function(){return{errorLoading:function(){return"No se pudieron cargar los resultados"},inputTooLong:function(e){var n=e.input.length-e.maximum,r="Por favor, elimine "+n+" car";return r+=1==n?"ácter":"acteres"},inputTooShort:function(e){var n=e.minimum-e.input.length,r="Por favor, introduzca "+n+" car";return r+=1==n?"ácter":"acteres"},loadingMore:function(){return"Cargando más resultados…"},maximumSelected:function(e){var n="Sólo puede seleccionar "+e.maximum+" elemento";return 1!=e.maximum&&(n+="s"),n},noResults:function(){return"No se encontraron resultados"},searching:function(){return"Buscando…"},removeAllItems:function(){return"Eliminar todos los elementos"}}}),e.define,e.require}();
\ No newline at end of file
diff --git a/pandora_console/include/javascript/i18n/et.js b/pandora_console/include/javascript/i18n/et.js
new file mode 100644
index 0000000000..070b61a26d
--- /dev/null
+++ b/pandora_console/include/javascript/i18n/et.js
@@ -0,0 +1,3 @@
+/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/et",[],function(){return{inputTooLong:function(e){var n=e.input.length-e.maximum,t="Sisesta "+n+" täht";return 1!=n&&(t+="e"),t+=" vähem"},inputTooShort:function(e){var n=e.minimum-e.input.length,t="Sisesta "+n+" täht";return 1!=n&&(t+="e"),t+=" rohkem"},loadingMore:function(){return"Laen tulemusi…"},maximumSelected:function(e){var n="Saad vaid "+e.maximum+" tulemus";return 1==e.maximum?n+="e":n+="t",n+=" valida"},noResults:function(){return"Tulemused puuduvad"},searching:function(){return"Otsin…"},removeAllItems:function(){return"Eemalda kõik esemed"}}}),e.define,e.require}();
\ No newline at end of file
diff --git a/pandora_console/include/javascript/i18n/eu.js b/pandora_console/include/javascript/i18n/eu.js
new file mode 100644
index 0000000000..90d5e73f8a
--- /dev/null
+++ b/pandora_console/include/javascript/i18n/eu.js
@@ -0,0 +1,3 @@
+/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/eu",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Idatzi ";return n+=1==t?"karaktere bat":t+" karaktere",n+=" gutxiago"},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Idatzi ";return n+=1==t?"karaktere bat":t+" karaktere",n+=" gehiago"},loadingMore:function(){return"Emaitza gehiago kargatzen…"},maximumSelected:function(e){return 1===e.maximum?"Elementu bakarra hauta dezakezu":e.maximum+" elementu hauta ditzakezu soilik"},noResults:function(){return"Ez da bat datorrenik aurkitu"},searching:function(){return"Bilatzen…"},removeAllItems:function(){return"Kendu elementu guztiak"}}}),e.define,e.require}();
\ No newline at end of file
diff --git a/pandora_console/include/javascript/i18n/fa.js b/pandora_console/include/javascript/i18n/fa.js
new file mode 100644
index 0000000000..e1ffdbed0d
--- /dev/null
+++ b/pandora_console/include/javascript/i18n/fa.js
@@ -0,0 +1,3 @@
+/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/fa",[],function(){return{errorLoading:function(){return"امکان بارگذاری نتایج وجود ندارد."},inputTooLong:function(n){return"لطفاً "+(n.input.length-n.maximum)+" کاراکتر را حذف نمایید"},inputTooShort:function(n){return"لطفاً تعداد "+(n.minimum-n.input.length)+" کاراکتر یا بیشتر وارد نمایید"},loadingMore:function(){return"در حال بارگذاری نتایج بیشتر..."},maximumSelected:function(n){return"شما تنها میتوانید "+n.maximum+" آیتم را انتخاب نمایید"},noResults:function(){return"هیچ نتیجهای یافت نشد"},searching:function(){return"در حال جستجو..."},removeAllItems:function(){return"همه موارد را حذف کنید"}}}),n.define,n.require}();
\ No newline at end of file
diff --git a/pandora_console/include/javascript/i18n/fi.js b/pandora_console/include/javascript/i18n/fi.js
new file mode 100644
index 0000000000..ffed1247dd
--- /dev/null
+++ b/pandora_console/include/javascript/i18n/fi.js
@@ -0,0 +1,3 @@
+/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/fi",[],function(){return{errorLoading:function(){return"Tuloksia ei saatu ladattua."},inputTooLong:function(n){return"Ole hyvä ja anna "+(n.input.length-n.maximum)+" merkkiä vähemmän"},inputTooShort:function(n){return"Ole hyvä ja anna "+(n.minimum-n.input.length)+" merkkiä lisää"},loadingMore:function(){return"Ladataan lisää tuloksia…"},maximumSelected:function(n){return"Voit valita ainoastaan "+n.maximum+" kpl"},noResults:function(){return"Ei tuloksia"},searching:function(){return"Haetaan…"},removeAllItems:function(){return"Poista kaikki kohteet"}}}),n.define,n.require}();
\ No newline at end of file
diff --git a/pandora_console/include/javascript/i18n/fr.js b/pandora_console/include/javascript/i18n/fr.js
new file mode 100644
index 0000000000..dd02f973ff
--- /dev/null
+++ b/pandora_console/include/javascript/i18n/fr.js
@@ -0,0 +1,3 @@
+/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/fr",[],function(){return{errorLoading:function(){return"Les résultats ne peuvent pas être chargés."},inputTooLong:function(e){var n=e.input.length-e.maximum;return"Supprimez "+n+" caractère"+(n>1?"s":"")},inputTooShort:function(e){var n=e.minimum-e.input.length;return"Saisissez au moins "+n+" caractère"+(n>1?"s":"")},loadingMore:function(){return"Chargement de résultats supplémentaires…"},maximumSelected:function(e){return"Vous pouvez seulement sélectionner "+e.maximum+" élément"+(e.maximum>1?"s":"")},noResults:function(){return"Aucun résultat trouvé"},searching:function(){return"Recherche en cours…"},removeAllItems:function(){return"Supprimer tous les éléments"}}}),e.define,e.require}();
\ No newline at end of file
diff --git a/pandora_console/include/javascript/i18n/gl.js b/pandora_console/include/javascript/i18n/gl.js
new file mode 100644
index 0000000000..208a005705
--- /dev/null
+++ b/pandora_console/include/javascript/i18n/gl.js
@@ -0,0 +1,3 @@
+/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/gl",[],function(){return{errorLoading:function(){return"Non foi posíbel cargar os resultados."},inputTooLong:function(e){var n=e.input.length-e.maximum;return 1===n?"Elimine un carácter":"Elimine "+n+" caracteres"},inputTooShort:function(e){var n=e.minimum-e.input.length;return 1===n?"Engada un carácter":"Engada "+n+" caracteres"},loadingMore:function(){return"Cargando máis resultados…"},maximumSelected:function(e){return 1===e.maximum?"Só pode seleccionar un elemento":"Só pode seleccionar "+e.maximum+" elementos"},noResults:function(){return"Non se atoparon resultados"},searching:function(){return"Buscando…"},removeAllItems:function(){return"Elimina todos os elementos"}}}),e.define,e.require}();
\ No newline at end of file
diff --git a/pandora_console/include/javascript/i18n/he.js b/pandora_console/include/javascript/i18n/he.js
new file mode 100644
index 0000000000..25a8805aa0
--- /dev/null
+++ b/pandora_console/include/javascript/i18n/he.js
@@ -0,0 +1,3 @@
+/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/he",[],function(){return{errorLoading:function(){return"שגיאה בטעינת התוצאות"},inputTooLong:function(n){var e=n.input.length-n.maximum,r="נא למחוק ";return r+=1===e?"תו אחד":e+" תווים"},inputTooShort:function(n){var e=n.minimum-n.input.length,r="נא להכניס ";return r+=1===e?"תו אחד":e+" תווים",r+=" או יותר"},loadingMore:function(){return"טוען תוצאות נוספות…"},maximumSelected:function(n){var e="באפשרותך לבחור עד ";return 1===n.maximum?e+="פריט אחד":e+=n.maximum+" פריטים",e},noResults:function(){return"לא נמצאו תוצאות"},searching:function(){return"מחפש…"},removeAllItems:function(){return"הסר את כל הפריטים"}}}),n.define,n.require}();
\ No newline at end of file
diff --git a/pandora_console/include/javascript/i18n/hi.js b/pandora_console/include/javascript/i18n/hi.js
new file mode 100644
index 0000000000..f3ed798434
--- /dev/null
+++ b/pandora_console/include/javascript/i18n/hi.js
@@ -0,0 +1,3 @@
+/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/hi",[],function(){return{errorLoading:function(){return"परिणामों को लोड नहीं किया जा सका।"},inputTooLong:function(n){var e=n.input.length-n.maximum,r=e+" अक्षर को हटा दें";return e>1&&(r=e+" अक्षरों को हटा दें "),r},inputTooShort:function(n){return"कृपया "+(n.minimum-n.input.length)+" या अधिक अक्षर दर्ज करें"},loadingMore:function(){return"अधिक परिणाम लोड हो रहे है..."},maximumSelected:function(n){return"आप केवल "+n.maximum+" आइटम का चयन कर सकते हैं"},noResults:function(){return"कोई परिणाम नहीं मिला"},searching:function(){return"खोज रहा है..."},removeAllItems:function(){return"सभी वस्तुओं को हटा दें"}}}),n.define,n.require}();
\ No newline at end of file
diff --git a/pandora_console/include/javascript/i18n/hr.js b/pandora_console/include/javascript/i18n/hr.js
new file mode 100644
index 0000000000..cb3268db16
--- /dev/null
+++ b/pandora_console/include/javascript/i18n/hr.js
@@ -0,0 +1,3 @@
+/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/hr",[],function(){function n(n){var e=" "+n+" znak";return n%10<5&&n%10>0&&(n%100<5||n%100>19)?n%10>1&&(e+="a"):e+="ova",e}return{errorLoading:function(){return"Preuzimanje nije uspjelo."},inputTooLong:function(e){return"Unesite "+n(e.input.length-e.maximum)},inputTooShort:function(e){return"Unesite još "+n(e.minimum-e.input.length)},loadingMore:function(){return"Učitavanje rezultata…"},maximumSelected:function(n){return"Maksimalan broj odabranih stavki je "+n.maximum},noResults:function(){return"Nema rezultata"},searching:function(){return"Pretraga…"},removeAllItems:function(){return"Ukloni sve stavke"}}}),n.define,n.require}();
\ No newline at end of file
diff --git a/pandora_console/include/javascript/i18n/hsb.js b/pandora_console/include/javascript/i18n/hsb.js
new file mode 100644
index 0000000000..3d5bf09dbd
--- /dev/null
+++ b/pandora_console/include/javascript/i18n/hsb.js
@@ -0,0 +1,3 @@
+/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/hsb",[],function(){var n=["znamješko","znamješce","znamješka","znamješkow"],e=["zapisk","zapiskaj","zapiski","zapiskow"],u=function(n,e){return 1===n?e[0]:2===n?e[1]:n>2&&n<=4?e[2]:n>=5?e[3]:void 0};return{errorLoading:function(){return"Wuslědki njedachu so začitać."},inputTooLong:function(e){var a=e.input.length-e.maximum;return"Prošu zhašej "+a+" "+u(a,n)},inputTooShort:function(e){var a=e.minimum-e.input.length;return"Prošu zapodaj znajmjeńša "+a+" "+u(a,n)},loadingMore:function(){return"Dalše wuslědki so začitaja…"},maximumSelected:function(n){return"Móžeš jenož "+n.maximum+" "+u(n.maximum,e)+"wubrać"},noResults:function(){return"Žane wuslědki namakane"},searching:function(){return"Pyta so…"},removeAllItems:function(){return"Remove all items"}}}),n.define,n.require}();
\ No newline at end of file
diff --git a/pandora_console/include/javascript/i18n/hu.js b/pandora_console/include/javascript/i18n/hu.js
new file mode 100644
index 0000000000..4893aa2f70
--- /dev/null
+++ b/pandora_console/include/javascript/i18n/hu.js
@@ -0,0 +1,3 @@
+/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/hu",[],function(){return{errorLoading:function(){return"Az eredmények betöltése nem sikerült."},inputTooLong:function(e){return"Túl hosszú. "+(e.input.length-e.maximum)+" karakterrel több, mint kellene."},inputTooShort:function(e){return"Túl rövid. Még "+(e.minimum-e.input.length)+" karakter hiányzik."},loadingMore:function(){return"Töltés…"},maximumSelected:function(e){return"Csak "+e.maximum+" elemet lehet kiválasztani."},noResults:function(){return"Nincs találat."},searching:function(){return"Keresés…"},removeAllItems:function(){return"Távolítson el minden elemet"}}}),e.define,e.require}();
\ No newline at end of file
diff --git a/pandora_console/include/javascript/i18n/hy.js b/pandora_console/include/javascript/i18n/hy.js
new file mode 100644
index 0000000000..8230007141
--- /dev/null
+++ b/pandora_console/include/javascript/i18n/hy.js
@@ -0,0 +1,3 @@
+/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/hy",[],function(){return{errorLoading:function(){return"Արդյունքները հնարավոր չէ բեռնել։"},inputTooLong:function(n){return"Խնդրում ենք հեռացնել "+(n.input.length-n.maximum)+" նշան"},inputTooShort:function(n){return"Խնդրում ենք մուտքագրել "+(n.minimum-n.input.length)+" կամ ավել նշաններ"},loadingMore:function(){return"Բեռնվում են նոր արդյունքներ․․․"},maximumSelected:function(n){return"Դուք կարող եք ընտրել առավելագույնը "+n.maximum+" կետ"},noResults:function(){return"Արդյունքներ չեն գտնվել"},searching:function(){return"Որոնում․․․"},removeAllItems:function(){return"Հեռացնել բոլոր տարրերը"}}}),n.define,n.require}();
\ No newline at end of file
diff --git a/pandora_console/include/javascript/i18n/id.js b/pandora_console/include/javascript/i18n/id.js
new file mode 100644
index 0000000000..4a0b3bf009
--- /dev/null
+++ b/pandora_console/include/javascript/i18n/id.js
@@ -0,0 +1,3 @@
+/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/id",[],function(){return{errorLoading:function(){return"Data tidak boleh diambil."},inputTooLong:function(n){return"Hapuskan "+(n.input.length-n.maximum)+" huruf"},inputTooShort:function(n){return"Masukkan "+(n.minimum-n.input.length)+" huruf lagi"},loadingMore:function(){return"Mengambil data…"},maximumSelected:function(n){return"Anda hanya dapat memilih "+n.maximum+" pilihan"},noResults:function(){return"Tidak ada data yang sesuai"},searching:function(){return"Mencari…"},removeAllItems:function(){return"Hapus semua item"}}}),n.define,n.require}();
\ No newline at end of file
diff --git a/pandora_console/include/javascript/i18n/is.js b/pandora_console/include/javascript/i18n/is.js
new file mode 100644
index 0000000000..cca5bbecf0
--- /dev/null
+++ b/pandora_console/include/javascript/i18n/is.js
@@ -0,0 +1,3 @@
+/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/is",[],function(){return{inputTooLong:function(n){var t=n.input.length-n.maximum,e="Vinsamlegast styttið texta um "+t+" staf";return t<=1?e:e+"i"},inputTooShort:function(n){var t=n.minimum-n.input.length,e="Vinsamlegast skrifið "+t+" staf";return t>1&&(e+="i"),e+=" í viðbót"},loadingMore:function(){return"Sæki fleiri niðurstöður…"},maximumSelected:function(n){return"Þú getur aðeins valið "+n.maximum+" atriði"},noResults:function(){return"Ekkert fannst"},searching:function(){return"Leita…"},removeAllItems:function(){return"Fjarlægðu öll atriði"}}}),n.define,n.require}();
\ No newline at end of file
diff --git a/pandora_console/include/javascript/i18n/it.js b/pandora_console/include/javascript/i18n/it.js
new file mode 100644
index 0000000000..507c7d9f29
--- /dev/null
+++ b/pandora_console/include/javascript/i18n/it.js
@@ -0,0 +1,3 @@
+/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/it",[],function(){return{errorLoading:function(){return"I risultati non possono essere caricati."},inputTooLong:function(e){var n=e.input.length-e.maximum,t="Per favore cancella "+n+" caratter";return t+=1!==n?"i":"e"},inputTooShort:function(e){return"Per favore inserisci "+(e.minimum-e.input.length)+" o più caratteri"},loadingMore:function(){return"Caricando più risultati…"},maximumSelected:function(e){var n="Puoi selezionare solo "+e.maximum+" element";return 1!==e.maximum?n+="i":n+="o",n},noResults:function(){return"Nessun risultato trovato"},searching:function(){return"Sto cercando…"},removeAllItems:function(){return"Rimuovi tutti gli oggetti"}}}),e.define,e.require}();
\ No newline at end of file
diff --git a/pandora_console/include/javascript/i18n/ja.js b/pandora_console/include/javascript/i18n/ja.js
new file mode 100644
index 0000000000..451025e2c7
--- /dev/null
+++ b/pandora_console/include/javascript/i18n/ja.js
@@ -0,0 +1,3 @@
+/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/ja",[],function(){return{errorLoading:function(){return"結果が読み込まれませんでした"},inputTooLong:function(n){return n.input.length-n.maximum+" 文字を削除してください"},inputTooShort:function(n){return"少なくとも "+(n.minimum-n.input.length)+" 文字を入力してください"},loadingMore:function(){return"読み込み中…"},maximumSelected:function(n){return n.maximum+" 件しか選択できません"},noResults:function(){return"対象が見つかりません"},searching:function(){return"検索しています…"},removeAllItems:function(){return"すべてのアイテムを削除"}}}),n.define,n.require}();
\ No newline at end of file
diff --git a/pandora_console/include/javascript/i18n/ka.js b/pandora_console/include/javascript/i18n/ka.js
new file mode 100644
index 0000000000..60c593b705
--- /dev/null
+++ b/pandora_console/include/javascript/i18n/ka.js
@@ -0,0 +1,3 @@
+/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/ka",[],function(){return{errorLoading:function(){return"მონაცემების ჩატვირთვა შეუძლებელია."},inputTooLong:function(n){return"გთხოვთ აკრიფეთ "+(n.input.length-n.maximum)+" სიმბოლოთი ნაკლები"},inputTooShort:function(n){return"გთხოვთ აკრიფეთ "+(n.minimum-n.input.length)+" სიმბოლო ან მეტი"},loadingMore:function(){return"მონაცემების ჩატვირთვა…"},maximumSelected:function(n){return"თქვენ შეგიძლიათ აირჩიოთ არაუმეტეს "+n.maximum+" ელემენტი"},noResults:function(){return"რეზულტატი არ მოიძებნა"},searching:function(){return"ძიება…"},removeAllItems:function(){return"ამოიღე ყველა ელემენტი"}}}),n.define,n.require}();
\ No newline at end of file
diff --git a/pandora_console/include/javascript/i18n/km.js b/pandora_console/include/javascript/i18n/km.js
new file mode 100644
index 0000000000..4dca94f414
--- /dev/null
+++ b/pandora_console/include/javascript/i18n/km.js
@@ -0,0 +1,3 @@
+/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/km",[],function(){return{errorLoading:function(){return"មិនអាចទាញយកទិន្នន័យ"},inputTooLong:function(n){return"សូមលុបចេញ "+(n.input.length-n.maximum)+" អក្សរ"},inputTooShort:function(n){return"សូមបញ្ចូល"+(n.minimum-n.input.length)+" អក្សរ រឺ ច្រើនជាងនេះ"},loadingMore:function(){return"កំពុងទាញយកទិន្នន័យបន្ថែម..."},maximumSelected:function(n){return"អ្នកអាចជ្រើសរើសបានតែ "+n.maximum+" ជម្រើសប៉ុណ្ណោះ"},noResults:function(){return"មិនមានលទ្ធផល"},searching:function(){return"កំពុងស្វែងរក..."},removeAllItems:function(){return"លុបធាតុទាំងអស់"}}}),n.define,n.require}();
\ No newline at end of file
diff --git a/pandora_console/include/javascript/i18n/ko.js b/pandora_console/include/javascript/i18n/ko.js
new file mode 100644
index 0000000000..f2880fb004
--- /dev/null
+++ b/pandora_console/include/javascript/i18n/ko.js
@@ -0,0 +1,3 @@
+/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/ko",[],function(){return{errorLoading:function(){return"결과를 불러올 수 없습니다."},inputTooLong:function(n){return"너무 깁니다. "+(n.input.length-n.maximum)+" 글자 지워주세요."},inputTooShort:function(n){return"너무 짧습니다. "+(n.minimum-n.input.length)+" 글자 더 입력해주세요."},loadingMore:function(){return"불러오는 중…"},maximumSelected:function(n){return"최대 "+n.maximum+"개까지만 선택 가능합니다."},noResults:function(){return"결과가 없습니다."},searching:function(){return"검색 중…"},removeAllItems:function(){return"모든 항목 삭제"}}}),n.define,n.require}();
\ No newline at end of file
diff --git a/pandora_console/include/javascript/i18n/lt.js b/pandora_console/include/javascript/i18n/lt.js
new file mode 100644
index 0000000000..f6a42155ad
--- /dev/null
+++ b/pandora_console/include/javascript/i18n/lt.js
@@ -0,0 +1,3 @@
+/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/lt",[],function(){function n(n,e,i,t){return n%10==1&&(n%100<11||n%100>19)?e:n%10>=2&&n%10<=9&&(n%100<11||n%100>19)?i:t}return{inputTooLong:function(e){var i=e.input.length-e.maximum,t="Pašalinkite "+i+" simbol";return t+=n(i,"į","ius","ių")},inputTooShort:function(e){var i=e.minimum-e.input.length,t="Įrašykite dar "+i+" simbol";return t+=n(i,"į","ius","ių")},loadingMore:function(){return"Kraunama daugiau rezultatų…"},maximumSelected:function(e){var i="Jūs galite pasirinkti tik "+e.maximum+" element";return i+=n(e.maximum,"ą","us","ų")},noResults:function(){return"Atitikmenų nerasta"},searching:function(){return"Ieškoma…"},removeAllItems:function(){return"Pašalinti visus elementus"}}}),n.define,n.require}();
\ No newline at end of file
diff --git a/pandora_console/include/javascript/i18n/lv.js b/pandora_console/include/javascript/i18n/lv.js
new file mode 100644
index 0000000000..806dc5c433
--- /dev/null
+++ b/pandora_console/include/javascript/i18n/lv.js
@@ -0,0 +1,3 @@
+/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/lv",[],function(){function e(e,n,u,i){return 11===e?n:e%10==1?u:i}return{inputTooLong:function(n){var u=n.input.length-n.maximum,i="Lūdzu ievadiet par "+u;return(i+=" simbol"+e(u,"iem","u","iem"))+" mazāk"},inputTooShort:function(n){var u=n.minimum-n.input.length,i="Lūdzu ievadiet vēl "+u;return i+=" simbol"+e(u,"us","u","us")},loadingMore:function(){return"Datu ielāde…"},maximumSelected:function(n){var u="Jūs varat izvēlēties ne vairāk kā "+n.maximum;return u+=" element"+e(n.maximum,"us","u","us")},noResults:function(){return"Sakritību nav"},searching:function(){return"Meklēšana…"},removeAllItems:function(){return"Noņemt visus vienumus"}}}),e.define,e.require}();
\ No newline at end of file
diff --git a/pandora_console/include/javascript/i18n/mk.js b/pandora_console/include/javascript/i18n/mk.js
new file mode 100644
index 0000000000..cb7b84a263
--- /dev/null
+++ b/pandora_console/include/javascript/i18n/mk.js
@@ -0,0 +1,3 @@
+/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/mk",[],function(){return{inputTooLong:function(n){var e=(n.input.length,n.maximum,"Ве молиме внесете "+n.maximum+" помалку карактер");return 1!==n.maximum&&(e+="и"),e},inputTooShort:function(n){var e=(n.minimum,n.input.length,"Ве молиме внесете уште "+n.maximum+" карактер");return 1!==n.maximum&&(e+="и"),e},loadingMore:function(){return"Вчитување резултати…"},maximumSelected:function(n){var e="Можете да изберете само "+n.maximum+" ставк";return 1===n.maximum?e+="а":e+="и",e},noResults:function(){return"Нема пронајдено совпаѓања"},searching:function(){return"Пребарување…"},removeAllItems:function(){return"Отстрани ги сите предмети"}}}),n.define,n.require}();
\ No newline at end of file
diff --git a/pandora_console/include/javascript/i18n/ms.js b/pandora_console/include/javascript/i18n/ms.js
new file mode 100644
index 0000000000..6bd7eaa3e0
--- /dev/null
+++ b/pandora_console/include/javascript/i18n/ms.js
@@ -0,0 +1,3 @@
+/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/ms",[],function(){return{errorLoading:function(){return"Keputusan tidak berjaya dimuatkan."},inputTooLong:function(n){return"Sila hapuskan "+(n.input.length-n.maximum)+" aksara"},inputTooShort:function(n){return"Sila masukkan "+(n.minimum-n.input.length)+" atau lebih aksara"},loadingMore:function(){return"Sedang memuatkan keputusan…"},maximumSelected:function(n){return"Anda hanya boleh memilih "+n.maximum+" pilihan"},noResults:function(){return"Tiada padanan yang ditemui"},searching:function(){return"Mencari…"},removeAllItems:function(){return"Keluarkan semua item"}}}),n.define,n.require}();
\ No newline at end of file
diff --git a/pandora_console/include/javascript/i18n/nb.js b/pandora_console/include/javascript/i18n/nb.js
new file mode 100644
index 0000000000..25d89c6870
--- /dev/null
+++ b/pandora_console/include/javascript/i18n/nb.js
@@ -0,0 +1,3 @@
+/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/nb",[],function(){return{errorLoading:function(){return"Kunne ikke hente resultater."},inputTooLong:function(e){return"Vennligst fjern "+(e.input.length-e.maximum)+" tegn"},inputTooShort:function(e){return"Vennligst skriv inn "+(e.minimum-e.input.length)+" tegn til"},loadingMore:function(){return"Laster flere resultater…"},maximumSelected:function(e){return"Du kan velge maks "+e.maximum+" elementer"},noResults:function(){return"Ingen treff"},searching:function(){return"Søker…"},removeAllItems:function(){return"Fjern alle elementer"}}}),e.define,e.require}();
\ No newline at end of file
diff --git a/pandora_console/include/javascript/i18n/ne.js b/pandora_console/include/javascript/i18n/ne.js
new file mode 100644
index 0000000000..1c39f67210
--- /dev/null
+++ b/pandora_console/include/javascript/i18n/ne.js
@@ -0,0 +1,3 @@
+/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/ne",[],function(){return{errorLoading:function(){return"नतिजाहरु देखाउन सकिएन।"},inputTooLong:function(n){var e=n.input.length-n.maximum,u="कृपया "+e+" अक्षर मेटाउनुहोस्।";return 1!=e&&(u+="कृपया "+e+" अक्षरहरु मेटाउनुहोस्।"),u},inputTooShort:function(n){return"कृपया बाँकी रहेका "+(n.minimum-n.input.length)+" वा अरु धेरै अक्षरहरु भर्नुहोस्।"},loadingMore:function(){return"अरु नतिजाहरु भरिँदैछन् …"},maximumSelected:function(n){var e="तँपाई "+n.maximum+" वस्तु मात्र छान्न पाउँनुहुन्छ।";return 1!=n.maximum&&(e="तँपाई "+n.maximum+" वस्तुहरु मात्र छान्न पाउँनुहुन्छ।"),e},noResults:function(){return"कुनै पनि नतिजा भेटिएन।"},searching:function(){return"खोजि हुँदैछ…"}}}),n.define,n.require}();
\ No newline at end of file
diff --git a/pandora_console/include/javascript/i18n/nl.js b/pandora_console/include/javascript/i18n/nl.js
new file mode 100644
index 0000000000..2b74058d23
--- /dev/null
+++ b/pandora_console/include/javascript/i18n/nl.js
@@ -0,0 +1,3 @@
+/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/nl",[],function(){return{errorLoading:function(){return"De resultaten konden niet worden geladen."},inputTooLong:function(e){return"Gelieve "+(e.input.length-e.maximum)+" karakters te verwijderen"},inputTooShort:function(e){return"Gelieve "+(e.minimum-e.input.length)+" of meer karakters in te voeren"},loadingMore:function(){return"Meer resultaten laden…"},maximumSelected:function(e){var n=1==e.maximum?"kan":"kunnen",r="Er "+n+" maar "+e.maximum+" item";return 1!=e.maximum&&(r+="s"),r+=" worden geselecteerd"},noResults:function(){return"Geen resultaten gevonden…"},searching:function(){return"Zoeken…"},removeAllItems:function(){return"Verwijder alle items"}}}),e.define,e.require}();
\ No newline at end of file
diff --git a/pandora_console/include/javascript/i18n/pl.js b/pandora_console/include/javascript/i18n/pl.js
new file mode 100644
index 0000000000..4ca5748c38
--- /dev/null
+++ b/pandora_console/include/javascript/i18n/pl.js
@@ -0,0 +1,3 @@
+/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/pl",[],function(){var n=["znak","znaki","znaków"],e=["element","elementy","elementów"],r=function(n,e){return 1===n?e[0]:n>1&&n<=4?e[1]:n>=5?e[2]:void 0};return{errorLoading:function(){return"Nie można załadować wyników."},inputTooLong:function(e){var t=e.input.length-e.maximum;return"Usuń "+t+" "+r(t,n)},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Podaj przynajmniej "+t+" "+r(t,n)},loadingMore:function(){return"Trwa ładowanie…"},maximumSelected:function(n){return"Możesz zaznaczyć tylko "+n.maximum+" "+r(n.maximum,e)},noResults:function(){return"Brak wyników"},searching:function(){return"Trwa wyszukiwanie…"},removeAllItems:function(){return"Usuń wszystkie przedmioty"}}}),n.define,n.require}();
\ No newline at end of file
diff --git a/pandora_console/include/javascript/i18n/ps.js b/pandora_console/include/javascript/i18n/ps.js
new file mode 100644
index 0000000000..9b008e4c14
--- /dev/null
+++ b/pandora_console/include/javascript/i18n/ps.js
@@ -0,0 +1,3 @@
+/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/ps",[],function(){return{errorLoading:function(){return"پايلي نه سي ترلاسه کېدای"},inputTooLong:function(n){var e=n.input.length-n.maximum,r="د مهربانۍ لمخي "+e+" توری ړنګ کړئ";return 1!=e&&(r=r.replace("توری","توري")),r},inputTooShort:function(n){return"لږ تر لږه "+(n.minimum-n.input.length)+" يا ډېر توري وليکئ"},loadingMore:function(){return"نوري پايلي ترلاسه کيږي..."},maximumSelected:function(n){var e="تاسو يوازي "+n.maximum+" قلم په نښه کولای سی";return 1!=n.maximum&&(e=e.replace("قلم","قلمونه")),e},noResults:function(){return"پايلي و نه موندل سوې"},searching:function(){return"لټول کيږي..."},removeAllItems:function(){return"ټول توکي لرې کړئ"}}}),n.define,n.require}();
\ No newline at end of file
diff --git a/pandora_console/include/javascript/i18n/pt-BR.js b/pandora_console/include/javascript/i18n/pt-BR.js
new file mode 100644
index 0000000000..c991e2550a
--- /dev/null
+++ b/pandora_console/include/javascript/i18n/pt-BR.js
@@ -0,0 +1,3 @@
+/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/pt-BR",[],function(){return{errorLoading:function(){return"Os resultados não puderam ser carregados."},inputTooLong:function(e){var n=e.input.length-e.maximum,r="Apague "+n+" caracter";return 1!=n&&(r+="es"),r},inputTooShort:function(e){return"Digite "+(e.minimum-e.input.length)+" ou mais caracteres"},loadingMore:function(){return"Carregando mais resultados…"},maximumSelected:function(e){var n="Você só pode selecionar "+e.maximum+" ite";return 1==e.maximum?n+="m":n+="ns",n},noResults:function(){return"Nenhum resultado encontrado"},searching:function(){return"Buscando…"},removeAllItems:function(){return"Remover todos os itens"}}}),e.define,e.require}();
\ No newline at end of file
diff --git a/pandora_console/include/javascript/i18n/pt.js b/pandora_console/include/javascript/i18n/pt.js
new file mode 100644
index 0000000000..b5da1a6b49
--- /dev/null
+++ b/pandora_console/include/javascript/i18n/pt.js
@@ -0,0 +1,3 @@
+/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/pt",[],function(){return{errorLoading:function(){return"Os resultados não puderam ser carregados."},inputTooLong:function(e){var r=e.input.length-e.maximum,n="Por favor apague "+r+" ";return n+=1!=r?"caracteres":"caractere"},inputTooShort:function(e){return"Introduza "+(e.minimum-e.input.length)+" ou mais caracteres"},loadingMore:function(){return"A carregar mais resultados…"},maximumSelected:function(e){var r="Apenas pode seleccionar "+e.maximum+" ";return r+=1!=e.maximum?"itens":"item"},noResults:function(){return"Sem resultados"},searching:function(){return"A procurar…"},removeAllItems:function(){return"Remover todos os itens"}}}),e.define,e.require}();
\ No newline at end of file
diff --git a/pandora_console/include/javascript/i18n/ro.js b/pandora_console/include/javascript/i18n/ro.js
new file mode 100644
index 0000000000..1ba7b40bef
--- /dev/null
+++ b/pandora_console/include/javascript/i18n/ro.js
@@ -0,0 +1,3 @@
+/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/ro",[],function(){return{errorLoading:function(){return"Rezultatele nu au putut fi incărcate."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Vă rugăm să ștergeți"+t+" caracter";return 1!==t&&(n+="e"),n},inputTooShort:function(e){return"Vă rugăm să introduceți "+(e.minimum-e.input.length)+" sau mai multe caractere"},loadingMore:function(){return"Se încarcă mai multe rezultate…"},maximumSelected:function(e){var t="Aveți voie să selectați cel mult "+e.maximum;return t+=" element",1!==e.maximum&&(t+="e"),t},noResults:function(){return"Nu au fost găsite rezultate"},searching:function(){return"Căutare…"},removeAllItems:function(){return"Eliminați toate elementele"}}}),e.define,e.require}();
\ No newline at end of file
diff --git a/pandora_console/include/javascript/i18n/ru.js b/pandora_console/include/javascript/i18n/ru.js
new file mode 100644
index 0000000000..63a7d66c3b
--- /dev/null
+++ b/pandora_console/include/javascript/i18n/ru.js
@@ -0,0 +1,3 @@
+/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/ru",[],function(){function n(n,e,r,u){return n%10<5&&n%10>0&&n%100<5||n%100>20?n%10>1?r:e:u}return{errorLoading:function(){return"Невозможно загрузить результаты"},inputTooLong:function(e){var r=e.input.length-e.maximum,u="Пожалуйста, введите на "+r+" символ";return u+=n(r,"","a","ов"),u+=" меньше"},inputTooShort:function(e){var r=e.minimum-e.input.length,u="Пожалуйста, введите ещё хотя бы "+r+" символ";return u+=n(r,"","a","ов")},loadingMore:function(){return"Загрузка данных…"},maximumSelected:function(e){var r="Вы можете выбрать не более "+e.maximum+" элемент";return r+=n(e.maximum,"","a","ов")},noResults:function(){return"Совпадений не найдено"},searching:function(){return"Поиск…"},removeAllItems:function(){return"Удалить все элементы"}}}),n.define,n.require}();
\ No newline at end of file
diff --git a/pandora_console/include/javascript/i18n/sk.js b/pandora_console/include/javascript/i18n/sk.js
new file mode 100644
index 0000000000..5049528ad0
--- /dev/null
+++ b/pandora_console/include/javascript/i18n/sk.js
@@ -0,0 +1,3 @@
+/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/sk",[],function(){var e={2:function(e){return e?"dva":"dve"},3:function(){return"tri"},4:function(){return"štyri"}};return{errorLoading:function(){return"Výsledky sa nepodarilo načítať."},inputTooLong:function(n){var t=n.input.length-n.maximum;return 1==t?"Prosím, zadajte o jeden znak menej":t>=2&&t<=4?"Prosím, zadajte o "+e[t](!0)+" znaky menej":"Prosím, zadajte o "+t+" znakov menej"},inputTooShort:function(n){var t=n.minimum-n.input.length;return 1==t?"Prosím, zadajte ešte jeden znak":t<=4?"Prosím, zadajte ešte ďalšie "+e[t](!0)+" znaky":"Prosím, zadajte ešte ďalších "+t+" znakov"},loadingMore:function(){return"Načítanie ďalších výsledkov…"},maximumSelected:function(n){return 1==n.maximum?"Môžete zvoliť len jednu položku":n.maximum>=2&&n.maximum<=4?"Môžete zvoliť najviac "+e[n.maximum](!1)+" položky":"Môžete zvoliť najviac "+n.maximum+" položiek"},noResults:function(){return"Nenašli sa žiadne položky"},searching:function(){return"Vyhľadávanie…"},removeAllItems:function(){return"Odstráňte všetky položky"}}}),e.define,e.require}();
\ No newline at end of file
diff --git a/pandora_console/include/javascript/i18n/sl.js b/pandora_console/include/javascript/i18n/sl.js
new file mode 100644
index 0000000000..4d0b7d3e34
--- /dev/null
+++ b/pandora_console/include/javascript/i18n/sl.js
@@ -0,0 +1,3 @@
+/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/sl",[],function(){return{errorLoading:function(){return"Zadetkov iskanja ni bilo mogoče naložiti."},inputTooLong:function(e){var n=e.input.length-e.maximum,t="Prosim zbrišite "+n+" znak";return 2==n?t+="a":1!=n&&(t+="e"),t},inputTooShort:function(e){var n=e.minimum-e.input.length,t="Prosim vpišite še "+n+" znak";return 2==n?t+="a":1!=n&&(t+="e"),t},loadingMore:function(){return"Nalagam več zadetkov…"},maximumSelected:function(e){var n="Označite lahko največ "+e.maximum+" predmet";return 2==e.maximum?n+="a":1!=e.maximum&&(n+="e"),n},noResults:function(){return"Ni zadetkov."},searching:function(){return"Iščem…"},removeAllItems:function(){return"Odstranite vse elemente"}}}),e.define,e.require}();
\ No newline at end of file
diff --git a/pandora_console/include/javascript/i18n/sq.js b/pandora_console/include/javascript/i18n/sq.js
new file mode 100644
index 0000000000..59162024ed
--- /dev/null
+++ b/pandora_console/include/javascript/i18n/sq.js
@@ -0,0 +1,3 @@
+/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/sq",[],function(){return{errorLoading:function(){return"Rezultatet nuk mund të ngarkoheshin."},inputTooLong:function(e){var n=e.input.length-e.maximum,t="Të lutem fshi "+n+" karakter";return 1!=n&&(t+="e"),t},inputTooShort:function(e){return"Të lutem shkruaj "+(e.minimum-e.input.length)+" ose më shumë karaktere"},loadingMore:function(){return"Duke ngarkuar më shumë rezultate…"},maximumSelected:function(e){var n="Mund të zgjedhësh vetëm "+e.maximum+" element";return 1!=e.maximum&&(n+="e"),n},noResults:function(){return"Nuk u gjet asnjë rezultat"},searching:function(){return"Duke kërkuar…"},removeAllItems:function(){return"Hiq të gjitha sendet"}}}),e.define,e.require}();
\ No newline at end of file
diff --git a/pandora_console/include/javascript/i18n/sr-Cyrl.js b/pandora_console/include/javascript/i18n/sr-Cyrl.js
new file mode 100644
index 0000000000..ce13ce8f9a
--- /dev/null
+++ b/pandora_console/include/javascript/i18n/sr-Cyrl.js
@@ -0,0 +1,3 @@
+/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/sr-Cyrl",[],function(){function n(n,e,r,u){return n%10==1&&n%100!=11?e:n%10>=2&&n%10<=4&&(n%100<12||n%100>14)?r:u}return{errorLoading:function(){return"Преузимање није успело."},inputTooLong:function(e){var r=e.input.length-e.maximum,u="Обришите "+r+" симбол";return u+=n(r,"","а","а")},inputTooShort:function(e){var r=e.minimum-e.input.length,u="Укуцајте бар још "+r+" симбол";return u+=n(r,"","а","а")},loadingMore:function(){return"Преузимање још резултата…"},maximumSelected:function(e){var r="Можете изабрати само "+e.maximum+" ставк";return r+=n(e.maximum,"у","е","и")},noResults:function(){return"Ништа није пронађено"},searching:function(){return"Претрага…"},removeAllItems:function(){return"Уклоните све ставке"}}}),n.define,n.require}();
\ No newline at end of file
diff --git a/pandora_console/include/javascript/i18n/sr.js b/pandora_console/include/javascript/i18n/sr.js
new file mode 100644
index 0000000000..dd407a06dc
--- /dev/null
+++ b/pandora_console/include/javascript/i18n/sr.js
@@ -0,0 +1,3 @@
+/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/sr",[],function(){function n(n,e,r,t){return n%10==1&&n%100!=11?e:n%10>=2&&n%10<=4&&(n%100<12||n%100>14)?r:t}return{errorLoading:function(){return"Preuzimanje nije uspelo."},inputTooLong:function(e){var r=e.input.length-e.maximum,t="Obrišite "+r+" simbol";return t+=n(r,"","a","a")},inputTooShort:function(e){var r=e.minimum-e.input.length,t="Ukucajte bar još "+r+" simbol";return t+=n(r,"","a","a")},loadingMore:function(){return"Preuzimanje još rezultata…"},maximumSelected:function(e){var r="Možete izabrati samo "+e.maximum+" stavk";return r+=n(e.maximum,"u","e","i")},noResults:function(){return"Ništa nije pronađeno"},searching:function(){return"Pretraga…"},removeAllItems:function(){return"Уклоните све ставке"}}}),n.define,n.require}();
\ No newline at end of file
diff --git a/pandora_console/include/javascript/i18n/sv.js b/pandora_console/include/javascript/i18n/sv.js
new file mode 100644
index 0000000000..1bc8724a79
--- /dev/null
+++ b/pandora_console/include/javascript/i18n/sv.js
@@ -0,0 +1,3 @@
+/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/sv",[],function(){return{errorLoading:function(){return"Resultat kunde inte laddas."},inputTooLong:function(n){return"Vänligen sudda ut "+(n.input.length-n.maximum)+" tecken"},inputTooShort:function(n){return"Vänligen skriv in "+(n.minimum-n.input.length)+" eller fler tecken"},loadingMore:function(){return"Laddar fler resultat…"},maximumSelected:function(n){return"Du kan max välja "+n.maximum+" element"},noResults:function(){return"Inga träffar"},searching:function(){return"Söker…"},removeAllItems:function(){return"Ta bort alla objekt"}}}),n.define,n.require}();
\ No newline at end of file
diff --git a/pandora_console/include/javascript/i18n/th.js b/pandora_console/include/javascript/i18n/th.js
new file mode 100644
index 0000000000..63eab7114b
--- /dev/null
+++ b/pandora_console/include/javascript/i18n/th.js
@@ -0,0 +1,3 @@
+/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/th",[],function(){return{errorLoading:function(){return"ไม่สามารถค้นข้อมูลได้"},inputTooLong:function(n){return"โปรดลบออก "+(n.input.length-n.maximum)+" ตัวอักษร"},inputTooShort:function(n){return"โปรดพิมพ์เพิ่มอีก "+(n.minimum-n.input.length)+" ตัวอักษร"},loadingMore:function(){return"กำลังค้นข้อมูลเพิ่ม…"},maximumSelected:function(n){return"คุณสามารถเลือกได้ไม่เกิน "+n.maximum+" รายการ"},noResults:function(){return"ไม่พบข้อมูล"},searching:function(){return"กำลังค้นข้อมูล…"},removeAllItems:function(){return"ลบรายการทั้งหมด"}}}),n.define,n.require}();
\ No newline at end of file
diff --git a/pandora_console/include/javascript/i18n/tk.js b/pandora_console/include/javascript/i18n/tk.js
new file mode 100644
index 0000000000..30255ff377
--- /dev/null
+++ b/pandora_console/include/javascript/i18n/tk.js
@@ -0,0 +1,3 @@
+/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/tk",[],function(){return{errorLoading:function(){return"Netije ýüklenmedi."},inputTooLong:function(e){return e.input.length-e.maximum+" harp bozuň."},inputTooShort:function(e){return"Ýene-de iň az "+(e.minimum-e.input.length)+" harp ýazyň."},loadingMore:function(){return"Köpräk netije görkezilýär…"},maximumSelected:function(e){return"Diňe "+e.maximum+" sanysyny saýlaň."},noResults:function(){return"Netije tapylmady."},searching:function(){return"Gözlenýär…"},removeAllItems:function(){return"Remove all items"}}}),e.define,e.require}();
\ No newline at end of file
diff --git a/pandora_console/include/javascript/i18n/tr.js b/pandora_console/include/javascript/i18n/tr.js
new file mode 100644
index 0000000000..fc4c0bf051
--- /dev/null
+++ b/pandora_console/include/javascript/i18n/tr.js
@@ -0,0 +1,3 @@
+/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/tr",[],function(){return{errorLoading:function(){return"Sonuç yüklenemedi"},inputTooLong:function(n){return n.input.length-n.maximum+" karakter daha girmelisiniz"},inputTooShort:function(n){return"En az "+(n.minimum-n.input.length)+" karakter daha girmelisiniz"},loadingMore:function(){return"Daha fazla…"},maximumSelected:function(n){return"Sadece "+n.maximum+" seçim yapabilirsiniz"},noResults:function(){return"Sonuç bulunamadı"},searching:function(){return"Aranıyor…"},removeAllItems:function(){return"Tüm öğeleri kaldır"}}}),n.define,n.require}();
\ No newline at end of file
diff --git a/pandora_console/include/javascript/i18n/uk.js b/pandora_console/include/javascript/i18n/uk.js
new file mode 100644
index 0000000000..63697e3884
--- /dev/null
+++ b/pandora_console/include/javascript/i18n/uk.js
@@ -0,0 +1,3 @@
+/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/uk",[],function(){function n(n,e,u,r){return n%100>10&&n%100<15?r:n%10==1?e:n%10>1&&n%10<5?u:r}return{errorLoading:function(){return"Неможливо завантажити результати"},inputTooLong:function(e){return"Будь ласка, видаліть "+(e.input.length-e.maximum)+" "+n(e.maximum,"літеру","літери","літер")},inputTooShort:function(n){return"Будь ласка, введіть "+(n.minimum-n.input.length)+" або більше літер"},loadingMore:function(){return"Завантаження інших результатів…"},maximumSelected:function(e){return"Ви можете вибрати лише "+e.maximum+" "+n(e.maximum,"пункт","пункти","пунктів")},noResults:function(){return"Нічого не знайдено"},searching:function(){return"Пошук…"},removeAllItems:function(){return"Видалити всі елементи"}}}),n.define,n.require}();
\ No newline at end of file
diff --git a/pandora_console/include/javascript/i18n/vi.js b/pandora_console/include/javascript/i18n/vi.js
new file mode 100644
index 0000000000..24f3bc2d61
--- /dev/null
+++ b/pandora_console/include/javascript/i18n/vi.js
@@ -0,0 +1,3 @@
+/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/vi",[],function(){return{inputTooLong:function(n){return"Vui lòng xóa bớt "+(n.input.length-n.maximum)+" ký tự"},inputTooShort:function(n){return"Vui lòng nhập thêm từ "+(n.minimum-n.input.length)+" ký tự trở lên"},loadingMore:function(){return"Đang lấy thêm kết quả…"},maximumSelected:function(n){return"Chỉ có thể chọn được "+n.maximum+" lựa chọn"},noResults:function(){return"Không tìm thấy kết quả"},searching:function(){return"Đang tìm…"},removeAllItems:function(){return"Xóa tất cả các mục"}}}),n.define,n.require}();
\ No newline at end of file
diff --git a/pandora_console/include/javascript/i18n/zh-CN.js b/pandora_console/include/javascript/i18n/zh-CN.js
new file mode 100644
index 0000000000..2c5649d310
--- /dev/null
+++ b/pandora_console/include/javascript/i18n/zh-CN.js
@@ -0,0 +1,3 @@
+/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/zh-CN",[],function(){return{errorLoading:function(){return"无法载入结果。"},inputTooLong:function(n){return"请删除"+(n.input.length-n.maximum)+"个字符"},inputTooShort:function(n){return"请再输入至少"+(n.minimum-n.input.length)+"个字符"},loadingMore:function(){return"载入更多结果…"},maximumSelected:function(n){return"最多只能选择"+n.maximum+"个项目"},noResults:function(){return"未找到结果"},searching:function(){return"搜索中…"},removeAllItems:function(){return"删除所有项目"}}}),n.define,n.require}();
\ No newline at end of file
diff --git a/pandora_console/include/javascript/i18n/zh-TW.js b/pandora_console/include/javascript/i18n/zh-TW.js
new file mode 100644
index 0000000000..570a566937
--- /dev/null
+++ b/pandora_console/include/javascript/i18n/zh-TW.js
@@ -0,0 +1,3 @@
+/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
+
+!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/zh-TW",[],function(){return{inputTooLong:function(n){return"請刪掉"+(n.input.length-n.maximum)+"個字元"},inputTooShort:function(n){return"請再輸入"+(n.minimum-n.input.length)+"個字元"},loadingMore:function(){return"載入中…"},maximumSelected:function(n){return"你只能選擇最多"+n.maximum+"項"},noResults:function(){return"沒有找到相符的項目"},searching:function(){return"搜尋中…"},removeAllItems:function(){return"刪除所有項目"}}}),n.define,n.require}();
\ No newline at end of file
diff --git a/pandora_console/include/javascript/select2.min.js b/pandora_console/include/javascript/select2.min.js
new file mode 100644
index 0000000000..e421426434
--- /dev/null
+++ b/pandora_console/include/javascript/select2.min.js
@@ -0,0 +1,2 @@
+/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
+!function(n){"function"==typeof define&&define.amd?define(["jquery"],n):"object"==typeof module&&module.exports?module.exports=function(e,t){return void 0===t&&(t="undefined"!=typeof window?require("jquery"):require("jquery")(e)),n(t),t}:n(jQuery)}(function(u){var e=function(){if(u&&u.fn&&u.fn.select2&&u.fn.select2.amd)var e=u.fn.select2.amd;var t,n,r,h,o,s,f,g,m,v,y,_,i,a,b;function w(e,t){return i.call(e,t)}function l(e,t){var n,r,i,o,s,a,l,c,u,d,p,h=t&&t.split("/"),f=y.map,g=f&&f["*"]||{};if(e){for(s=(e=e.split("/")).length-1,y.nodeIdCompat&&b.test(e[s])&&(e[s]=e[s].replace(b,"")),"."===e[0].charAt(0)&&h&&(e=h.slice(0,h.length-1).concat(e)),u=0;u":">",'"':""","'":"'","/":"/"};return"string"!=typeof e?e:String(e).replace(/[&<>"'\/\\]/g,function(e){return t[e]})},i.appendMany=function(e,t){if("1.7"===o.fn.jquery.substr(0,3)){var n=o();o.map(t,function(e){n=n.add(e)}),t=n}e.append(t)},i.__cache={};var n=0;return i.GetUniqueElementId=function(e){var t=e.getAttribute("data-select2-id");return null==t&&(e.id?(t=e.id,e.setAttribute("data-select2-id",t)):(e.setAttribute("data-select2-id",++n),t=n.toString())),t},i.StoreData=function(e,t,n){var r=i.GetUniqueElementId(e);i.__cache[r]||(i.__cache[r]={}),i.__cache[r][t]=n},i.GetData=function(e,t){var n=i.GetUniqueElementId(e);return t?i.__cache[n]&&null!=i.__cache[n][t]?i.__cache[n][t]:o(e).data(t):i.__cache[n]},i.RemoveData=function(e){var t=i.GetUniqueElementId(e);null!=i.__cache[t]&&delete i.__cache[t],e.removeAttribute("data-select2-id")},i}),e.define("select2/results",["jquery","./utils"],function(h,f){function r(e,t,n){this.$element=e,this.data=n,this.options=t,r.__super__.constructor.call(this)}return f.Extend(r,f.Observable),r.prototype.render=function(){var e=h('');return this.options.get("multiple")&&e.attr("aria-multiselectable","true"),this.$results=e},r.prototype.clear=function(){this.$results.empty()},r.prototype.displayMessage=function(e){var t=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var n=h(' '),r=this.options.get("translations").get(e.message);n.append(t(r(e.args))),n[0].className+=" select2-results__message",this.$results.append(n)},r.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},r.prototype.append=function(e){this.hideLoading();var t=[];if(null!=e.results&&0!==e.results.length){e.results=this.sort(e.results);for(var n=0;n",{class:"select2-results__options select2-results__options--nested"});p.append(l),s.append(a),s.append(p)}else this.template(e,t);return f.StoreData(t,"data",e),t},r.prototype.bind=function(t,e){var l=this,n=t.id+"-results";this.$results.attr("id",n),t.on("results:all",function(e){l.clear(),l.append(e.data),t.isOpen()&&(l.setClasses(),l.highlightFirstItem())}),t.on("results:append",function(e){l.append(e.data),t.isOpen()&&l.setClasses()}),t.on("query",function(e){l.hideMessages(),l.showLoading(e)}),t.on("select",function(){t.isOpen()&&(l.setClasses(),l.options.get("scrollAfterSelect")&&l.highlightFirstItem())}),t.on("unselect",function(){t.isOpen()&&(l.setClasses(),l.options.get("scrollAfterSelect")&&l.highlightFirstItem())}),t.on("open",function(){l.$results.attr("aria-expanded","true"),l.$results.attr("aria-hidden","false"),l.setClasses(),l.ensureHighlightVisible()}),t.on("close",function(){l.$results.attr("aria-expanded","false"),l.$results.attr("aria-hidden","true"),l.$results.removeAttr("aria-activedescendant")}),t.on("results:toggle",function(){var e=l.getHighlightedResults();0!==e.length&&e.trigger("mouseup")}),t.on("results:select",function(){var e=l.getHighlightedResults();if(0!==e.length){var t=f.GetData(e[0],"data");"true"==e.attr("aria-selected")?l.trigger("close",{}):l.trigger("select",{data:t})}}),t.on("results:previous",function(){var e=l.getHighlightedResults(),t=l.$results.find("[aria-selected]"),n=t.index(e);if(!(n<=0)){var r=n-1;0===e.length&&(r=0);var i=t.eq(r);i.trigger("mouseenter");var o=l.$results.offset().top,s=i.offset().top,a=l.$results.scrollTop()+(s-o);0===r?l.$results.scrollTop(0):s-o<0&&l.$results.scrollTop(a)}}),t.on("results:next",function(){var e=l.getHighlightedResults(),t=l.$results.find("[aria-selected]"),n=t.index(e)+1;if(!(n>=t.length)){var r=t.eq(n);r.trigger("mouseenter");var i=l.$results.offset().top+l.$results.outerHeight(!1),o=r.offset().top+r.outerHeight(!1),s=l.$results.scrollTop()+o-i;0===n?l.$results.scrollTop(0):ithis.$results.outerHeight()||o<0)&&this.$results.scrollTop(i)}},r.prototype.template=function(e,t){var n=this.options.get("templateResult"),r=this.options.get("escapeMarkup"),i=n(e,t);null==i?t.style.display="none":"string"==typeof i?t.innerHTML=r(i):h(t).append(i)},r}),e.define("select2/keys",[],function(){return{BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46}}),e.define("select2/selection/base",["jquery","../utils","../keys"],function(n,r,i){function o(e,t){this.$element=e,this.options=t,o.__super__.constructor.call(this)}return r.Extend(o,r.Observable),o.prototype.render=function(){var e=n(' ');return this._tabindex=0,null!=r.GetData(this.$element[0],"old-tabindex")?this._tabindex=r.GetData(this.$element[0],"old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),e.attr("title",this.$element.attr("title")),e.attr("tabindex",this._tabindex),e.attr("aria-disabled","false"),this.$selection=e},o.prototype.bind=function(e,t){var n=this,r=e.id+"-results";this.container=e,this.$selection.on("focus",function(e){n.trigger("focus",e)}),this.$selection.on("blur",function(e){n._handleBlur(e)}),this.$selection.on("keydown",function(e){n.trigger("keypress",e),e.which===i.SPACE&&e.preventDefault()}),e.on("results:focus",function(e){n.$selection.attr("aria-activedescendant",e.data._resultId)}),e.on("selection:update",function(e){n.update(e.data)}),e.on("open",function(){n.$selection.attr("aria-expanded","true"),n.$selection.attr("aria-owns",r),n._attachCloseHandler(e)}),e.on("close",function(){n.$selection.attr("aria-expanded","false"),n.$selection.removeAttr("aria-activedescendant"),n.$selection.removeAttr("aria-owns"),n.$selection.trigger("focus"),n._detachCloseHandler(e)}),e.on("enable",function(){n.$selection.attr("tabindex",n._tabindex),n.$selection.attr("aria-disabled","false")}),e.on("disable",function(){n.$selection.attr("tabindex","-1"),n.$selection.attr("aria-disabled","true")})},o.prototype._handleBlur=function(e){var t=this;window.setTimeout(function(){document.activeElement==t.$selection[0]||n.contains(t.$selection[0],document.activeElement)||t.trigger("blur",e)},1)},o.prototype._attachCloseHandler=function(e){n(document.body).on("mousedown.select2."+e.id,function(e){var t=n(e.target).closest(".select2");n(".select2.select2-container--open").each(function(){this!=t[0]&&r.GetData(this,"element").select2("close")})})},o.prototype._detachCloseHandler=function(e){n(document.body).off("mousedown.select2."+e.id)},o.prototype.position=function(e,t){t.find(".selection").append(e)},o.prototype.destroy=function(){this._detachCloseHandler(this.container)},o.prototype.update=function(e){throw new Error("The `update` method must be defined in child classes.")},o.prototype.isEnabled=function(){return!this.isDisabled()},o.prototype.isDisabled=function(){return this.options.get("disabled")},o}),e.define("select2/selection/single",["jquery","./base","../utils","../keys"],function(e,t,n,r){function i(){i.__super__.constructor.apply(this,arguments)}return n.Extend(i,t),i.prototype.render=function(){var e=i.__super__.render.call(this);return e.addClass("select2-selection--single"),e.html(' '),e},i.prototype.bind=function(t,e){var n=this;i.__super__.bind.apply(this,arguments);var r=t.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",r).attr("role","textbox").attr("aria-readonly","true"),this.$selection.attr("aria-labelledby",r),this.$selection.on("mousedown",function(e){1===e.which&&n.trigger("toggle",{originalEvent:e})}),this.$selection.on("focus",function(e){}),this.$selection.on("blur",function(e){}),t.on("focus",function(e){t.isOpen()||n.$selection.trigger("focus")})},i.prototype.clear=function(){var e=this.$selection.find(".select2-selection__rendered");e.empty(),e.removeAttr("title")},i.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},i.prototype.selectionContainer=function(){return e(" ")},i.prototype.update=function(e){if(0!==e.length){var t=e[0],n=this.$selection.find(".select2-selection__rendered"),r=this.display(t,n);n.empty().append(r);var i=t.title||t.text;i?n.attr("title",i):n.removeAttr("title")}else this.clear()},i}),e.define("select2/selection/multiple",["jquery","./base","../utils"],function(i,e,l){function n(e,t){n.__super__.constructor.apply(this,arguments)}return l.Extend(n,e),n.prototype.render=function(){var e=n.__super__.render.call(this);return e.addClass("select2-selection--multiple"),e.html(''),e},n.prototype.bind=function(e,t){var r=this;n.__super__.bind.apply(this,arguments),this.$selection.on("click",function(e){r.trigger("toggle",{originalEvent:e})}),this.$selection.on("click",".select2-selection__choice__remove",function(e){if(!r.isDisabled()){var t=i(this).parent(),n=l.GetData(t[0],"data");r.trigger("unselect",{originalEvent:e,data:n})}})},n.prototype.clear=function(){var e=this.$selection.find(".select2-selection__rendered");e.empty(),e.removeAttr("title")},n.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},n.prototype.selectionContainer=function(){return i('× ')},n.prototype.update=function(e){if(this.clear(),0!==e.length){for(var t=[],n=0;n×');a.StoreData(r[0],"data",t),this.$selection.find(".select2-selection__rendered").prepend(r)}},e}),e.define("select2/selection/search",["jquery","../utils","../keys"],function(r,a,l){function e(e,t,n){e.call(this,t,n)}return e.prototype.render=function(e){var t=r(' ');this.$searchContainer=t,this.$search=t.find("input");var n=e.call(this);return this._transferTabIndex(),n},e.prototype.bind=function(e,t,n){var r=this,i=t.id+"-results";e.call(this,t,n),t.on("open",function(){r.$search.attr("aria-controls",i),r.$search.trigger("focus")}),t.on("close",function(){r.$search.val(""),r.$search.removeAttr("aria-controls"),r.$search.removeAttr("aria-activedescendant"),r.$search.trigger("focus")}),t.on("enable",function(){r.$search.prop("disabled",!1),r._transferTabIndex()}),t.on("disable",function(){r.$search.prop("disabled",!0)}),t.on("focus",function(e){r.$search.trigger("focus")}),t.on("results:focus",function(e){e.data._resultId?r.$search.attr("aria-activedescendant",e.data._resultId):r.$search.removeAttr("aria-activedescendant")}),this.$selection.on("focusin",".select2-search--inline",function(e){r.trigger("focus",e)}),this.$selection.on("focusout",".select2-search--inline",function(e){r._handleBlur(e)}),this.$selection.on("keydown",".select2-search--inline",function(e){if(e.stopPropagation(),r.trigger("keypress",e),r._keyUpPrevented=e.isDefaultPrevented(),e.which===l.BACKSPACE&&""===r.$search.val()){var t=r.$searchContainer.prev(".select2-selection__choice");if(0this.maximumInputLength?this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:t.term,params:t}}):e.call(this,t,n)},e}),e.define("select2/data/maximumSelectionLength",[],function(){function e(e,t,n){this.maximumSelectionLength=n.get("maximumSelectionLength"),e.call(this,t,n)}return e.prototype.bind=function(e,t,n){var r=this;e.call(this,t,n),t.on("select",function(){r._checkIfMaximumSelected()})},e.prototype.query=function(e,t,n){var r=this;this._checkIfMaximumSelected(function(){e.call(r,t,n)})},e.prototype._checkIfMaximumSelected=function(e,n){var r=this;this.current(function(e){var t=null!=e?e.length:0;0=r.maximumSelectionLength?r.trigger("results:message",{message:"maximumSelected",args:{maximum:r.maximumSelectionLength}}):n&&n()})},e}),e.define("select2/dropdown",["jquery","./utils"],function(t,e){function n(e,t){this.$element=e,this.options=t,n.__super__.constructor.call(this)}return e.Extend(n,e.Observable),n.prototype.render=function(){var e=t(' ');return e.attr("dir",this.options.get("dir")),this.$dropdown=e},n.prototype.bind=function(){},n.prototype.position=function(e,t){},n.prototype.destroy=function(){this.$dropdown.remove()},n}),e.define("select2/dropdown/search",["jquery","../utils"],function(o,e){function t(){}return t.prototype.render=function(e){var t=e.call(this),n=o(' ');return this.$searchContainer=n,this.$search=n.find("input"),t.prepend(n),t},t.prototype.bind=function(e,t,n){var r=this,i=t.id+"-results";e.call(this,t,n),this.$search.on("keydown",function(e){r.trigger("keypress",e),r._keyUpPrevented=e.isDefaultPrevented()}),this.$search.on("input",function(e){o(this).off("keyup")}),this.$search.on("keyup input",function(e){r.handleSearch(e)}),t.on("open",function(){r.$search.attr("tabindex",0),r.$search.attr("aria-controls",i),r.$search.trigger("focus"),window.setTimeout(function(){r.$search.trigger("focus")},0)}),t.on("close",function(){r.$search.attr("tabindex",-1),r.$search.removeAttr("aria-controls"),r.$search.removeAttr("aria-activedescendant"),r.$search.val(""),r.$search.trigger("blur")}),t.on("focus",function(){t.isOpen()||r.$search.trigger("focus")}),t.on("results:all",function(e){null!=e.query.term&&""!==e.query.term||(r.showSearch(e)?r.$searchContainer.removeClass("select2-search--hide"):r.$searchContainer.addClass("select2-search--hide"))}),t.on("results:focus",function(e){e.data._resultId?r.$search.attr("aria-activedescendant",e.data._resultId):r.$search.removeAttr("aria-activedescendant")})},t.prototype.handleSearch=function(e){if(!this._keyUpPrevented){var t=this.$search.val();this.trigger("query",{term:t})}this._keyUpPrevented=!1},t.prototype.showSearch=function(e,t){return!0},t}),e.define("select2/dropdown/hidePlaceholder",[],function(){function e(e,t,n,r){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),e.call(this,t,n,r)}return e.prototype.append=function(e,t){t.results=this.removePlaceholder(t.results),e.call(this,t)},e.prototype.normalizePlaceholder=function(e,t){return"string"==typeof t&&(t={id:"",text:t}),t},e.prototype.removePlaceholder=function(e,t){for(var n=t.slice(0),r=t.length-1;0<=r;r--){var i=t[r];this.placeholder.id===i.id&&n.splice(r,1)}return n},e}),e.define("select2/dropdown/infiniteScroll",["jquery"],function(n){function e(e,t,n,r){this.lastParams={},e.call(this,t,n,r),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return e.prototype.append=function(e,t){this.$loadingMore.remove(),this.loading=!1,e.call(this,t),this.showLoadingMore(t)&&(this.$results.append(this.$loadingMore),this.loadMoreIfNeeded())},e.prototype.bind=function(e,t,n){var r=this;e.call(this,t,n),t.on("query",function(e){r.lastParams=e,r.loading=!0}),t.on("query:append",function(e){r.lastParams=e,r.loading=!0}),this.$results.on("scroll",this.loadMoreIfNeeded.bind(this))},e.prototype.loadMoreIfNeeded=function(){var e=n.contains(document.documentElement,this.$loadingMore[0]);if(!this.loading&&e){var t=this.$results.offset().top+this.$results.outerHeight(!1);this.$loadingMore.offset().top+this.$loadingMore.outerHeight(!1)<=t+50&&this.loadMore()}},e.prototype.loadMore=function(){this.loading=!0;var e=n.extend({},{page:1},this.lastParams);e.page++,this.trigger("query:append",e)},e.prototype.showLoadingMore=function(e,t){return t.pagination&&t.pagination.more},e.prototype.createLoadingMore=function(){var e=n(' '),t=this.options.get("translations").get("loadingMore");return e.html(t(this.lastParams)),e},e}),e.define("select2/dropdown/attachBody",["jquery","../utils"],function(f,a){function e(e,t,n){this.$dropdownParent=f(n.get("dropdownParent")||document.body),e.call(this,t,n)}return e.prototype.bind=function(e,t,n){var r=this;e.call(this,t,n),t.on("open",function(){r._showDropdown(),r._attachPositioningHandler(t),r._bindContainerResultHandlers(t)}),t.on("close",function(){r._hideDropdown(),r._detachPositioningHandler(t)}),this.$dropdownContainer.on("mousedown",function(e){e.stopPropagation()})},e.prototype.destroy=function(e){e.call(this),this.$dropdownContainer.remove()},e.prototype.position=function(e,t,n){t.attr("class",n.attr("class")),t.removeClass("select2"),t.addClass("select2-container--open"),t.css({position:"absolute",top:-999999}),this.$container=n},e.prototype.render=function(e){var t=f(" "),n=e.call(this);return t.append(n),this.$dropdownContainer=t},e.prototype._hideDropdown=function(e){this.$dropdownContainer.detach()},e.prototype._bindContainerResultHandlers=function(e,t){if(!this._containerResultsHandlersBound){var n=this;t.on("results:all",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("results:append",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("results:message",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("select",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("unselect",function(){n._positionDropdown(),n._resizeDropdown()}),this._containerResultsHandlersBound=!0}},e.prototype._attachPositioningHandler=function(e,t){var n=this,r="scroll.select2."+t.id,i="resize.select2."+t.id,o="orientationchange.select2."+t.id,s=this.$container.parents().filter(a.hasScroll);s.each(function(){a.StoreData(this,"select2-scroll-position",{x:f(this).scrollLeft(),y:f(this).scrollTop()})}),s.on(r,function(e){var t=a.GetData(this,"select2-scroll-position");f(this).scrollTop(t.y)}),f(window).on(r+" "+i+" "+o,function(e){n._positionDropdown(),n._resizeDropdown()})},e.prototype._detachPositioningHandler=function(e,t){var n="scroll.select2."+t.id,r="resize.select2."+t.id,i="orientationchange.select2."+t.id;this.$container.parents().filter(a.hasScroll).off(n),f(window).off(n+" "+r+" "+i)},e.prototype._positionDropdown=function(){var e=f(window),t=this.$dropdown.hasClass("select2-dropdown--above"),n=this.$dropdown.hasClass("select2-dropdown--below"),r=null,i=this.$container.offset();i.bottom=i.top+this.$container.outerHeight(!1);var o={height:this.$container.outerHeight(!1)};o.top=i.top,o.bottom=i.top+o.height;var s=this.$dropdown.outerHeight(!1),a=e.scrollTop(),l=e.scrollTop()+e.height(),c=ai.bottom+s,d={left:i.left,top:o.bottom},p=this.$dropdownParent;"static"===p.css("position")&&(p=p.offsetParent());var h={top:0,left:0};(f.contains(document.body,p[0])||p[0].isConnected)&&(h=p.offset()),d.top-=h.top,d.left-=h.left,t||n||(r="below"),u||!c||t?!c&&u&&t&&(r="below"):r="above",("above"==r||t&&"below"!==r)&&(d.top=o.top-h.top-s),null!=r&&(this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+r),this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+r)),this.$dropdownContainer.css(d)},e.prototype._resizeDropdown=function(){var e={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(e.minWidth=e.width,e.position="relative",e.width="auto"),this.$dropdown.css(e)},e.prototype._showDropdown=function(e){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},e}),e.define("select2/dropdown/minimumResultsForSearch",[],function(){function e(e,t,n,r){this.minimumResultsForSearch=n.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),e.call(this,t,n,r)}return e.prototype.showSearch=function(e,t){return!(function e(t){for(var n=0,r=0;r ');return e.attr("dir",this.options.get("dir")),this.$container=e,this.$container.addClass("select2-container--"+this.options.get("theme")),u.StoreData(e[0],"element",this.$element),e},d}),e.define("jquery-mousewheel",["jquery"],function(e){return e}),e.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults","./select2/utils"],function(i,e,o,t,s){if(null==i.fn.select2){var a=["open","close","destroy"];i.fn.select2=function(t){if("object"==typeof(t=t||{}))return this.each(function(){var e=i.extend(!0,{},t);new o(i(this),e)}),this;if("string"!=typeof t)throw new Error("Invalid arguments for Select2: "+t);var n,r=Array.prototype.slice.call(arguments,1);return this.each(function(){var e=s.GetData(this,"select2");null==e&&window.console&&console.error&&console.error("The select2('"+t+"') method was called on an element that is not using Select2."),n=e[t].apply(e,r)}),-1 __('Groups'),
'arguments' => [
@@ -275,7 +280,7 @@ class SystemGroupStatusWidget extends Widget
'name' => 'groupId[]',
'returnAllGroup' => true,
'privilege' => 'ER',
- 'selected' => explode(',', $values['groupId'][0]),
+ 'selected' => $selected_groups,
'return' => true,
'multiple' => true,
],
diff --git a/pandora_console/include/lib/Group.php b/pandora_console/include/lib/Group.php
index c6f7312330..d054f67abe 100644
--- a/pandora_console/include/lib/Group.php
+++ b/pandora_console/include/lib/Group.php
@@ -38,6 +38,13 @@ require_once $config['homedir'].'/include/functions_groups.php';
class Group extends Entity
{
+ /**
+ * List of available ajax methods.
+ *
+ * @var array
+ */
+ private static $ajaxMethods = ['getGroupsForSelect'];
+
/**
* Builds a PandoraFMS\Group object from a group id.
@@ -79,7 +86,7 @@ class Group extends Entity
public function getChildren(
bool $ids_only=false,
bool $ignorePropagationState=false
- ) {
+ ):array {
$available_groups = \groups_get_children(
$this->id_grupo(),
$ignorePropagationState
@@ -98,20 +105,108 @@ class Group extends Entity
}
+ /**
+ * Retrieves a list of groups fitered.
+ *
+ * @param array $filter Filters to be applied.
+ *
+ * @return array With all results or false if error.
+ * @throws Exception On error.
+ */
+ private static function search(array $filter):array
+ {
+ // Default values.
+ if (empty($filter['id_user']) === true) {
+ // By default query current user groups.
+ $filter['id_user'] = false;
+ } else if (!\users_is_admin()) {
+ // Override user queried if user is not an admin.
+ $filter['id_user'] = false;
+ }
+
+ if (empty($filter['id_user']) === true) {
+ $filter['id_user'] = false;
+ }
+
+ if (empty($filter['keys_field']) === true) {
+ $filter['keys_field'] = 'id_grupo';
+ }
+
+ if (isset($filter['returnAllColumns']) === false) {
+ $filter['returnAllColumns'] = true;
+ }
+
+ $groups = \users_get_groups(
+ $filter['id_user'],
+ $filter['privilege'],
+ $filter['returnAllGroup'],
+ // Return all columns.
+ $filter['returnAllColumns'],
+ // Field id_groups is not being used anymore.
+ null,
+ $filter['keys_field'],
+ // Cache.
+ true,
+ // Search term.
+ $filter['search']
+ );
+
+ if (is_array($groups) === false) {
+ return [];
+ }
+
+ return $groups;
+
+ }
+
+
+ /**
+ * Returns an hierarchical ordered array.
+ *
+ * @param array $groups All groups available.
+ *
+ * @return array Groups ordered.
+ */
+ private static function prepareGroups(array $groups):array
+ {
+ $return = [];
+ $groups = \groups_get_groups_tree_recursive($groups);
+ foreach ($groups as $k => $v) {
+ $return[] = [
+ 'id' => $k,
+ 'text' => \io_safe_output(
+ \ui_print_truncate_text(
+ $v['nombre'],
+ GENERIC_SIZE_TEXT,
+ false,
+ true,
+ false
+ )
+ ),
+ 'level' => $v['deep'],
+ ];
+ }
+
+ return $return;
+
+ }
+
+
/**
* Saves current group definition to database.
*
* @return mixed Affected rows of false in case of error.
+ * @throws \Exception On error.
*/
public function save()
{
global $config;
- if (isset($config['centralized_management'])
+ if (isset($config['centralized_management']) === true
&& $config['centralized_management'] > 0
) {
throw new \Exception(
- get_class($this).' error, cannot be modified in a centralized management environment.'
+ get_class($this).' error, cannot be modified while centralized management environment.'
);
}
@@ -132,4 +227,123 @@ class Group extends Entity
}
+ /**
+ * Return error message to target.
+ *
+ * @param string $msg Error message.
+ *
+ * @return void
+ */
+ public static function error(string $msg)
+ {
+ echo json_encode(['error' => $msg]);
+ }
+
+
+ /**
+ * Verifies target method is allowed to be called using AJAX call.
+ *
+ * @param string $method Method to be invoked via AJAX.
+ *
+ * @return boolean Available (true), or not (false).
+ */
+ public static function ajaxMethod(string $method):bool
+ {
+ return in_array($method, self::$ajaxMethods) === true;
+ }
+
+
+ /**
+ * This method is being invoked by select2 to improve performance while
+ * installation has a lot of groups (more than 5k).
+ *
+ * Security applied in controller include/ajax/group.php.
+ *
+ * @return void
+ * @throws \Exception On error.
+ */
+ public static function getGroupsForSelect()
+ {
+ $id_user = get_parameter('id_user', false);
+ $privilege = get_parameter('privilege', 'AR');
+ $returnAllGroup = get_parameter('returnAllGroup', false);
+ $id_group = get_parameter('id_group', false);
+ $keys_field = get_parameter('keys_field', 'id_grupo');
+ $search = get_parameter('search', '');
+ $step = get_parameter('step', 1);
+ $limit = get_parameter('limit', false);
+ $exclusions = get_parameter('exclusions', '[]');
+ $inclusions = get_parameter('inclusions', '[]');
+
+ if (empty($id_user) === true) {
+ $id_user = false;
+ }
+
+ $groups = self::search(
+ [
+ 'id_user' => $id_user,
+ 'privilege' => $privilege,
+ 'returnAllGroup' => $returnAllGroup,
+ 'returnAllColumns' => true,
+ 'id_group' => $id_group,
+ 'keys_field' => $keys_field,
+ 'search' => $search,
+ ]
+ );
+
+ $exclusions = json_decode(\io_safe_output($exclusions));
+ if (empty($exclusions) === false) {
+ foreach ($exclusions as $ex) {
+ unset($groups[$ex]);
+ }
+ }
+
+ $inclusions = json_decode(\io_safe_output($inclusions));
+ if (empty($inclusions) === false) {
+ foreach ($inclusions as $g) {
+ if (empty($groups[$g]) === true) {
+ $groups[$g] = \groups_get_name($g);
+ }
+ }
+ }
+
+ $return = self::prepareGroups($groups);
+
+ if (is_array($return) === false) {
+ return;
+ }
+
+ // Use global block size configuration.
+ global $config;
+ $limit = $config['block_size'];
+ $offset = (($step - 1) * $limit);
+
+ // Pagination over effective groups retrieved.
+ // Calculation is faster than transference.
+ $count = count($return);
+ if (is_numeric($offset) === true && $offset >= 0) {
+ if (is_numeric($limit) === true && $limit > 0) {
+ $return = array_splice($return, $offset, $limit);
+ }
+ }
+
+ if ($step > 2) {
+ $processed = (($step - 2) * $limit);
+ } else {
+ $processed = 0;
+ }
+
+ $current_ammount = (count($return) + $processed);
+
+ echo json_encode(
+ [
+ 'results' => $return,
+ 'pagination' => [
+ 'more' => $current_ammount < $count,
+ ],
+ ]
+ );
+ }
+
+
}
diff --git a/pandora_console/include/styles/events.css b/pandora_console/include/styles/events.css
index a0b2fdf89c..4938877637 100644
--- a/pandora_console/include/styles/events.css
+++ b/pandora_console/include/styles/events.css
@@ -5,7 +5,7 @@ div.criticity {
text-align: center;
border-radius: 5px;
font-size: 0.8em;
- padding: 3px;
+ padding: 5px;
margin: 0;
display: table-cell;
vertical-align: middle;
@@ -32,7 +32,7 @@ form.flex-row ul {
width: 30%;
display: flex;
flex-direction: row;
- align-items: baseline;
+ align-items: center;
flex-wrap: wrap;
align-content: center;
justify-content: space-between;
@@ -124,6 +124,7 @@ table.dataTable tbody td {
max-width: 450px;
}
+.filter_input .select2,
.filter_input_little > select,
.filter_input_little > input,
.filter_input > select,
@@ -310,16 +311,3 @@ div.multi-response-buttons {
width: 100%;
text-align: right;
}
-
-div.criticity {
- width: 150px;
- height: 2em;
- color: #fff;
- text-align: center;
- border-radius: 5px;
- font-size: 0.8em;
- padding: 5px;
- margin: 0;
- display: table-cell;
- vertical-align: middle;
-}
diff --git a/pandora_console/include/styles/multiselect_filtered.css b/pandora_console/include/styles/multiselect_filtered.css
index 5c36df522d..a938422456 100644
--- a/pandora_console/include/styles/multiselect_filtered.css
+++ b/pandora_console/include/styles/multiselect_filtered.css
@@ -23,11 +23,17 @@
}
.multi-select-container .filter input,
-.multi-select-container .filter select {
+.multi-select-container .filter select,
+.multi-select-container .filter .select2 {
float: right;
width: 50%;
text-align: left;
}
+
+.multi-select-container .filter .select2 {
+ width: 50% !important;
+}
+
.multi-select-container .filter input[type="checkbox"] {
width: auto;
}
diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css
index 2ee0735edc..3cd5e8cd86 100644
--- a/pandora_console/include/styles/pandora.css
+++ b/pandora_console/include/styles/pandora.css
@@ -453,6 +453,18 @@ select:-internal-list-box {
width: 120px;
max-width: 120px;
}
+.w240px {
+ width: 240px;
+ max-width: 240px;
+}
+.w250px {
+ width: 250px;
+ max-width: 250px;
+}
+.w290px {
+ width: 290px;
+ max-width: 290px;
+}
.mw120px {
min-width: 120px;
}
@@ -474,6 +486,12 @@ select:-internal-list-box {
.w20px {
width: 20px;
}
+.nowrap {
+ white-space: nowrap;
+}
+.inline {
+ display: inline-block;
+}
.w10p {
width: 10%;
}
@@ -565,10 +583,12 @@ select:-internal-list-box {
justify-content: space-between;
align-content: center;
}
+.flex-nowrap {
+ flex-wrap: nowrap;
+}
.flex-row-baseline {
display: flex;
flex-direction: row;
- flex-wrap: wrap;
align-items: baseline;
}
@@ -590,11 +610,6 @@ select:-internal-list-box {
.flex-start {
justify-content: flex-start;
}
-
-.nowrap {
- flex-wrap: nowrap;
-}
-
.padding-2 {
padding: 2em;
}
@@ -604,6 +619,12 @@ select:-internal-list-box {
.padding-6 {
padding: 6em;
}
+.padding-right-2 {
+ padding-right: 2em;
+}
+.padding-right-2-imp {
+ padding-right: 2em !important;
+}
.margin-right-1 {
margin-right: 1em;
}
@@ -6151,3 +6172,7 @@ form#form-filter-interfaces ul li.select-interfaces {
flex-direction: row-reverse;
justify-content: flex-end;
}
+
+li .select2 {
+ max-width: 400px !important;
+}
diff --git a/pandora_console/include/styles/select2.min.css b/pandora_console/include/styles/select2.min.css
new file mode 100644
index 0000000000..7c18ad59df
--- /dev/null
+++ b/pandora_console/include/styles/select2.min.css
@@ -0,0 +1 @@
+.select2-container{box-sizing:border-box;display:inline-block;margin:0;position:relative;vertical-align:middle}.select2-container .select2-selection--single{box-sizing:border-box;cursor:pointer;display:block;height:28px;user-select:none;-webkit-user-select:none}.select2-container .select2-selection--single .select2-selection__rendered{display:block;padding-left:8px;padding-right:20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.select2-container .select2-selection--single .select2-selection__clear{position:relative}.select2-container[dir="rtl"] .select2-selection--single .select2-selection__rendered{padding-right:8px;padding-left:20px}.select2-container .select2-selection--multiple{box-sizing:border-box;cursor:pointer;display:block;min-height:32px;user-select:none;-webkit-user-select:none}.select2-container .select2-selection--multiple .select2-selection__rendered{display:inline-block;overflow:hidden;padding-left:8px;text-overflow:ellipsis;white-space:nowrap}.select2-container .select2-search--inline{float:left}.select2-container .select2-search--inline .select2-search__field{box-sizing:border-box;border:none;font-size:100%;margin-top:5px;padding:0}.select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-dropdown{background-color:white;border:1px solid #aaa;border-radius:4px;box-sizing:border-box;display:block;position:absolute;left:-100000px;width:100%;z-index:1051}.select2-results{display:block}.select2-results__options{list-style:none;margin:0;padding:0}.select2-results__option{padding:6px;user-select:none;-webkit-user-select:none}.select2-results__option[aria-selected]{cursor:pointer}.select2-container--open .select2-dropdown{left:0}.select2-container--open .select2-dropdown--above{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--open .select2-dropdown--below{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.select2-search--dropdown{display:block;padding:4px}.select2-search--dropdown .select2-search__field{padding:4px;width:100%;box-sizing:border-box}.select2-search--dropdown .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-search--dropdown.select2-search--hide{display:none}.select2-close-mask{border:0;margin:0;padding:0;display:block;position:fixed;left:0;top:0;min-height:100%;min-width:100%;height:auto;width:auto;opacity:0;z-index:99;background-color:#fff;filter:alpha(opacity=0)}.select2-hidden-accessible{border:0 !important;clip:rect(0 0 0 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;height:1px !important;overflow:hidden !important;padding:0 !important;position:absolute !important;width:1px !important;white-space:nowrap !important}.select2-container--default .select2-selection--single{background-color:#fff;border:1px solid #aaa;border-radius:4px}.select2-container--default .select2-selection--single .select2-selection__rendered{color:#444;line-height:28px}.select2-container--default .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:bold}.select2-container--default .select2-selection--single .select2-selection__placeholder{color:#999}.select2-container--default .select2-selection--single .select2-selection__arrow{height:26px;position:absolute;top:1px;right:1px;width:20px}.select2-container--default .select2-selection--single .select2-selection__arrow b{border-color:#888 transparent transparent transparent;border-style:solid;border-width:5px 4px 0 4px;height:0;left:50%;margin-left:-4px;margin-top:-2px;position:absolute;top:50%;width:0}.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__clear{float:left}.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__arrow{left:1px;right:auto}.select2-container--default.select2-container--disabled .select2-selection--single{background-color:#eee;cursor:default}.select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__clear{display:none}.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b{border-color:transparent transparent #888 transparent;border-width:0 4px 5px 4px}.select2-container--default .select2-selection--multiple{background-color:white;border:1px solid #aaa;border-radius:4px;cursor:text}.select2-container--default .select2-selection--multiple .select2-selection__rendered{box-sizing:border-box;list-style:none;margin:0;padding:0 5px;width:100%}.select2-container--default .select2-selection--multiple .select2-selection__rendered li{list-style:none}.select2-container--default .select2-selection--multiple .select2-selection__clear{cursor:pointer;float:right;font-weight:bold;margin-top:5px;margin-right:10px;padding:1px}.select2-container--default .select2-selection--multiple .select2-selection__choice{background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;cursor:default;float:left;margin-right:5px;margin-top:5px;padding:0 5px}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove{color:#999;cursor:pointer;display:inline-block;font-weight:bold;margin-right:2px}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover{color:#333}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice,.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-search--inline{float:right}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice{margin-left:5px;margin-right:auto}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove{margin-left:2px;margin-right:auto}.select2-container--default.select2-container--focus .select2-selection--multiple{border:solid black 1px;outline:0}.select2-container--default.select2-container--disabled .select2-selection--multiple{background-color:#eee;cursor:default}.select2-container--default.select2-container--disabled .select2-selection__choice__remove{display:none}.select2-container--default.select2-container--open.select2-container--above .select2-selection--single,.select2-container--default.select2-container--open.select2-container--above .select2-selection--multiple{border-top-left-radius:0;border-top-right-radius:0}.select2-container--default.select2-container--open.select2-container--below .select2-selection--single,.select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--default .select2-search--dropdown .select2-search__field{border:1px solid #aaa}.select2-container--default .select2-search--inline .select2-search__field{background:transparent;border:none;outline:0;box-shadow:none;-webkit-appearance:textfield}.select2-container--default .select2-results>.select2-results__options{max-height:200px;overflow-y:auto}.select2-container--default .select2-results__option[role=group]{padding:0}.select2-container--default .select2-results__option[aria-disabled=true]{color:#999}.select2-container--default .select2-results__option[aria-selected=true]{background-color:#ddd}.select2-container--default .select2-results__option .select2-results__option{padding-left:1em}.select2-container--default .select2-results__option .select2-results__option .select2-results__group{padding-left:0}.select2-container--default .select2-results__option .select2-results__option .select2-results__option{margin-left:-1em;padding-left:2em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-2em;padding-left:3em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-3em;padding-left:4em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-4em;padding-left:5em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-5em;padding-left:6em}.select2-container--default .select2-results__option--highlighted[aria-selected]{background-color:#5897fb;color:white}.select2-container--default .select2-results__group{cursor:default;display:block;padding:6px}.select2-container--classic .select2-selection--single{background-color:#f7f7f7;border:1px solid #aaa;border-radius:4px;outline:0;background-image:-webkit-linear-gradient(top, #fff 50%, #eee 100%);background-image:-o-linear-gradient(top, #fff 50%, #eee 100%);background-image:linear-gradient(to bottom, #fff 50%, #eee 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0)}.select2-container--classic .select2-selection--single:focus{border:1px solid #5897fb}.select2-container--classic .select2-selection--single .select2-selection__rendered{color:#444;line-height:28px}.select2-container--classic .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:bold;margin-right:10px}.select2-container--classic .select2-selection--single .select2-selection__placeholder{color:#999}.select2-container--classic .select2-selection--single .select2-selection__arrow{background-color:#ddd;border:none;border-left:1px solid #aaa;border-top-right-radius:4px;border-bottom-right-radius:4px;height:26px;position:absolute;top:1px;right:1px;width:20px;background-image:-webkit-linear-gradient(top, #eee 50%, #ccc 100%);background-image:-o-linear-gradient(top, #eee 50%, #ccc 100%);background-image:linear-gradient(to bottom, #eee 50%, #ccc 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFCCCCCC', GradientType=0)}.select2-container--classic .select2-selection--single .select2-selection__arrow b{border-color:#888 transparent transparent transparent;border-style:solid;border-width:5px 4px 0 4px;height:0;left:50%;margin-left:-4px;margin-top:-2px;position:absolute;top:50%;width:0}.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__clear{float:left}.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__arrow{border:none;border-right:1px solid #aaa;border-radius:0;border-top-left-radius:4px;border-bottom-left-radius:4px;left:1px;right:auto}.select2-container--classic.select2-container--open .select2-selection--single{border:1px solid #5897fb}.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow{background:transparent;border:none}.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow b{border-color:transparent transparent #888 transparent;border-width:0 4px 5px 4px}.select2-container--classic.select2-container--open.select2-container--above .select2-selection--single{border-top:none;border-top-left-radius:0;border-top-right-radius:0;background-image:-webkit-linear-gradient(top, #fff 0%, #eee 50%);background-image:-o-linear-gradient(top, #fff 0%, #eee 50%);background-image:linear-gradient(to bottom, #fff 0%, #eee 50%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0)}.select2-container--classic.select2-container--open.select2-container--below .select2-selection--single{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0;background-image:-webkit-linear-gradient(top, #eee 50%, #fff 100%);background-image:-o-linear-gradient(top, #eee 50%, #fff 100%);background-image:linear-gradient(to bottom, #eee 50%, #fff 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFFFFFFF', GradientType=0)}.select2-container--classic .select2-selection--multiple{background-color:white;border:1px solid #aaa;border-radius:4px;cursor:text;outline:0}.select2-container--classic .select2-selection--multiple:focus{border:1px solid #5897fb}.select2-container--classic .select2-selection--multiple .select2-selection__rendered{list-style:none;margin:0;padding:0 5px}.select2-container--classic .select2-selection--multiple .select2-selection__clear{display:none}.select2-container--classic .select2-selection--multiple .select2-selection__choice{background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;cursor:default;float:left;margin-right:5px;margin-top:5px;padding:0 5px}.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove{color:#888;cursor:pointer;display:inline-block;font-weight:bold;margin-right:2px}.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove:hover{color:#555}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice{float:right;margin-left:5px;margin-right:auto}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove{margin-left:2px;margin-right:auto}.select2-container--classic.select2-container--open .select2-selection--multiple{border:1px solid #5897fb}.select2-container--classic.select2-container--open.select2-container--above .select2-selection--multiple{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.select2-container--classic.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--classic .select2-search--dropdown .select2-search__field{border:1px solid #aaa;outline:0}.select2-container--classic .select2-search--inline .select2-search__field{outline:0;box-shadow:none}.select2-container--classic .select2-dropdown{background-color:#fff;border:1px solid transparent}.select2-container--classic .select2-dropdown--above{border-bottom:none}.select2-container--classic .select2-dropdown--below{border-top:none}.select2-container--classic .select2-results>.select2-results__options{max-height:200px;overflow-y:auto}.select2-container--classic .select2-results__option[role=group]{padding:0}.select2-container--classic .select2-results__option[aria-disabled=true]{color:grey}.select2-container--classic .select2-results__option--highlighted[aria-selected]{background-color:#3875d7;color:#fff}.select2-container--classic .select2-results__group{cursor:default;display:block;padding:6px}.select2-container--classic.select2-container--open .select2-dropdown{border-color:#5897fb}
diff --git a/pandora_console/install.php b/pandora_console/install.php
index 66ab87c388..15ce5f7548 100644
--- a/pandora_console/install.php
+++ b/pandora_console/install.php
@@ -129,7 +129,7 @@
';
-echo '
';
+echo ' ';
echo __('Group').' ';
@@ -221,17 +221,17 @@ $groups = users_get_groups(false, $access);
html_print_select_groups(false, $access, true, 'group_id', $group_id, 'this.form.submit()', '', '', false, false, true, '', false);
-echo ' ';
+echo ' ';
echo __('Recursion').' ';
html_print_checkbox('recursion', 1, $recursion, false, false, 'this.form.submit()');
-echo ' ';
+echo ' ';
echo __('Search').' ';
html_print_input_text('search', $search, '', 15);
-echo ' ';
+echo ' ';
$fields = [];
$fields[AGENT_STATUS_NORMAL] = __('Normal');
@@ -244,12 +244,12 @@ $fields[AGENT_STATUS_NOT_INIT] = __('Not init');
echo __('Status').' ';
html_print_select($fields, 'status', $status, 'this.form.submit()', __('All'), AGENT_STATUS_ALL, false, false, true, '', false, 'width: 90px;');
-echo ' ';
+echo ' ';
echo __('Search in custom fields').' ';
html_print_input_text('search_custom', $search_custom, '', 15);
-echo ' ';
+echo ' ';
html_print_submit_button(
__('Search'),
diff --git a/pandora_console/operation/agentes/exportdata.php b/pandora_console/operation/agentes/exportdata.php
index 5743084f6a..402b409e42 100644
--- a/pandora_console/operation/agentes/exportdata.php
+++ b/pandora_console/operation/agentes/exportdata.php
@@ -227,7 +227,7 @@ if (empty($export_btn) || $show_form) {
$groups = users_get_groups($config['id_user'], 'RR', users_can_manage_group_all());
- $table->data[0][1] = html_print_select_groups(
+ $table->data[0][1] = ''.html_print_select_groups(
$config['id_user'],
'RR',
true,
@@ -241,7 +241,7 @@ if (empty($export_btn) || $show_form) {
true,
'',
false
- );
+ ).'
';
// Agent selector.
$table->data[1][0] = ''.__('Source agent').' ';
diff --git a/pandora_console/operation/agentes/interface_traffic_graph_win.php b/pandora_console/operation/agentes/interface_traffic_graph_win.php
index 6e7e9f8098..fdd53c0bc3 100644
--- a/pandora_console/operation/agentes/interface_traffic_graph_win.php
+++ b/pandora_console/operation/agentes/interface_traffic_graph_win.php
@@ -233,8 +233,9 @@ $table->data[] = $data;
$table->rowclass[] = '';
$data = [];
-$data[0] = __('Show full scale graph (TIP)').ui_print_help_tip(
- __('This option may cause performance issues'),
+$data[0] = __('Show full scale graph (TIP)');
+$data[0] .= ui_print_help_tip(
+ __('TIP mode charts do not support average - maximum - minimum series, you can only enable TIP or average, maximum or minimum series'),
true,
'images/tip.png',
true
diff --git a/pandora_console/operation/agentes/pandora_networkmap.editor.php b/pandora_console/operation/agentes/pandora_networkmap.editor.php
index 16a26257ac..a16874705c 100644
--- a/pandora_console/operation/agentes/pandora_networkmap.editor.php
+++ b/pandora_console/operation/agentes/pandora_networkmap.editor.php
@@ -266,17 +266,26 @@ if ($not_found) {
);
$table->data[1][0] = __('Group');
- $table->data[1][1] = html_print_select_groups(
+ $table->data[1][1] = ''.html_print_select_groups(
+ // Id_user.
$config['id_user'],
+ // Privilege.
'AR',
+ // ReturnAllGroup.
true,
+ // Name.
'id_group_map',
+ // Selected.
$id_group_map,
+ // Script.
'',
+ // Nothing.
'',
+ // Nothing_value.
'',
+ // Return.
true
- );
+ ).'
';
$table->data[2][0] = __('Node radius');
$table->data[2][1] = html_print_input_text(
@@ -333,7 +342,7 @@ if ($not_found) {
$table->data['source_data_ip_mask'][1] = html_print_input_text('ip_mask', $ip_mask, '', 20, 255, true, $disabled_source);
$table->data['source_data_group'][0] = __('Source group');
- $table->data['source_data_group'][1] = html_print_select_groups(
+ $table->data['source_data_group'][1] = ''.html_print_select_groups(
$config['id_user'],
'AR',
true,
@@ -343,7 +352,7 @@ if ($not_found) {
'',
'',
true
- );
+ ).'
';
$table->data['source_data_group'][1] .= html_print_image(
'images/error.png',
true,
diff --git a/pandora_console/operation/agentes/stat_win.php b/pandora_console/operation/agentes/stat_win.php
index 3cade2cdbb..1d26666b57 100644
--- a/pandora_console/operation/agentes/stat_win.php
+++ b/pandora_console/operation/agentes/stat_win.php
@@ -80,6 +80,18 @@ $label = db_get_value(
'id_agente_modulo',
$id
);
+
+ui_require_css_file('register', 'include/styles/', true);
+// Connection lost alert.
+$conn_title = __('Connection with server has been lost');
+$conn_text = __('Connection to the server has been lost. Please check your internet connection or contact with administrator.');
+ui_print_message_dialog(
+ $conn_title,
+ $conn_text,
+ 'connection',
+ '/images/error_1.png'
+);
+
?>
@@ -171,6 +183,11 @@ $label = db_get_value(
$fullscale = get_parameter('fullscale', 0);
}
+ $type_mode_graph = get_parameter_checkbox(
+ 'type_mode_graph',
+ ($fullscale === 1) ? 0 : $config['type_mode_graph']
+ );
+
$time_compare = false;
if ($time_compare_separated) {
@@ -294,14 +311,8 @@ $label = db_get_value(
true
);
- $table->data[3][2] = __('Show full scale graph (TIP)');
- $table->data[3][3] = html_print_checkbox_switch(
- 'fullscale',
- 1,
- (bool) $fullscale,
- true,
- false
- );
+ $table->data[3][2] = '';
+ $table->data[3][3] = '';
if (!modules_is_boolean($id)) {
$table->data[4][0] = __('Zoom');
@@ -349,6 +360,29 @@ $label = db_get_value(
true
);
+
+ $table->data[6][0] = __('Show AVG/MAX/MIN data series in graph');
+ $table->data[6][1] = html_print_checkbox_switch(
+ 'type_mode_graph',
+ 1,
+ (bool) $type_mode_graph,
+ true,
+ false
+ );
+
+ $table->data[6][2] = __('Show full scale graph (TIP)');
+ $table->data[6][2] .= ui_print_help_tip(
+ __('TIP mode charts do not support average - maximum - minimum series, you can only enable TIP or average, maximum or minimum series'),
+ true
+ );
+ $table->data[6][3] = html_print_checkbox_switch(
+ 'fullscale',
+ 1,
+ (bool) $fullscale,
+ true,
+ false
+ );
+
$form_table = html_print_table($table, true);
$form_table .= '';
$form_table .= html_print_submit_button(
@@ -433,6 +467,7 @@ $label = db_get_value(
'fullscale' => $fullscale,
'zoom' => $zoom,
'height' => 300,
+ 'type_mode_graph' => $type_mode_graph,
];
$output .= grafico_modulo_sparse($params);
$output .= '
';
@@ -479,51 +514,68 @@ ui_include_time_picker(true);
?>
diff --git a/pandora_console/operation/events/events.php b/pandora_console/operation/events/events.php
index e5f06f357b..3ca4123b4f 100644
--- a/pandora_console/operation/events/events.php
+++ b/pandora_console/operation/events/events.php
@@ -878,24 +878,17 @@ if (is_metaconsole() !== true) {
*/
// Group.
-$user_groups_array = users_get_groups_for_select(
- $config['id_user'],
- $access,
- true,
- true,
- false
-);
-$data = html_print_select(
- $user_groups_array,
- 'id_group_filter',
- $id_group_filter,
- '',
- '',
- 0,
- true,
- false,
- false,
- 'w130'
+$data = html_print_input(
+ [
+ 'name' => 'id_group_filter',
+ 'returnAllGroup' => true,
+ 'privilege' => 'AR',
+ 'type' => 'select_groups',
+ 'selected' => (defined($id_group_filter) ? $id_group_filter : 0),
+ 'nothing' => false,
+ 'return' => true,
+ 'size' => '80%',
+ ]
);
$in = '
'.__('Group').' ';
$in .= $data.'
';
diff --git a/pandora_console/operation/events/sound_events.php b/pandora_console/operation/events/sound_events.php
index 6d337abc28..4377faaa63 100644
--- a/pandora_console/operation/events/sound_events.php
+++ b/pandora_console/operation/events/sound_events.php
@@ -37,9 +37,11 @@ if (! check_acl($config['id_user'], 0, 'ER') && ! check_acl($config['id_user'],
}
$agents = agents_get_group_agents(0, false, 'none', false, true);
-
+ob_start('ui_process_page_head');
+ob_start();
echo '';
echo '';
+
echo '
'.__('Sound Events').' ';
?>