2009-03-13 12:22:07 +01:00
|
|
|
(function($) {
|
2009-02-16 17:23:30 +01:00
|
|
|
var dummyFunc = function () {
|
2009-06-09 16:29:03 +02:00
|
|
|
return true;
|
2009-02-16 17:23:30 +01:00
|
|
|
};
|
2011-09-21 06:23:28 +02:00
|
|
|
|
|
|
|
var _pandoraSelectGroupAgent = function (disabled) {
|
|
|
|
var that = this;
|
|
|
|
|
|
|
|
this.defaults = {
|
|
|
|
agentSelect: "select#id_agent",
|
|
|
|
recursion: 0,
|
2012-04-09 13:09:40 +02:00
|
|
|
filter_agents_json: "",
|
2011-09-21 06:23:28 +02:00
|
|
|
loading: "#agent_loading",
|
|
|
|
callbackBefore: dummyFunc,
|
|
|
|
callbackPre: dummyFunc,
|
|
|
|
callbackPost: dummyFunc,
|
|
|
|
callbackAfter: dummyFunc,
|
|
|
|
debug: false,
|
|
|
|
disabled: disabled || false,
|
|
|
|
};
|
|
|
|
|
|
|
|
/* public methods */
|
|
|
|
this.construct = function (settings) {
|
|
|
|
return this.each (function() {
|
|
|
|
this.config = {};
|
|
|
|
|
|
|
|
this.config = $.extend (this.config, that.defaults, settings);
|
|
|
|
var config = this.config;
|
|
|
|
|
|
|
|
$(this).change (function () {
|
|
|
|
var $select = $(config.agentSelect).disable ();
|
|
|
|
$(config.loading).show ();
|
|
|
|
$("option[value!=0]", $select).remove ();
|
|
|
|
if (! config.callbackBefore (this))
|
|
|
|
return;
|
|
|
|
|
|
|
|
var opts = {
|
|
|
|
"page" : "godmode/groups/group_list",
|
|
|
|
"get_group_agents" : 1,
|
|
|
|
"id_group" : this.value,
|
|
|
|
"recursion" : config.recursion,
|
2012-04-09 13:09:40 +02:00
|
|
|
"filter_agents_json" : config.filter_agents_json,
|
2011-09-21 06:23:28 +02:00
|
|
|
"disabled" : config.disabled ? 1 : 0,
|
|
|
|
};
|
|
|
|
|
|
|
|
jQuery.post ("ajax.php",
|
|
|
|
opts,
|
|
|
|
function (data, status) {
|
|
|
|
jQuery.each (data, function (id, value) {
|
|
|
|
if (id !== 'keycount'){
|
2010-09-29 12:28:10 +02:00
|
|
|
config.callbackPre ();
|
|
|
|
option = $("<option></option>")
|
|
|
|
.attr ("value", id)
|
|
|
|
.html (value);
|
|
|
|
config.callbackPost (id, value, option);
|
|
|
|
$(config.agentSelect).append (option);
|
2011-09-21 06:23:28 +02:00
|
|
|
}
|
|
|
|
});
|
|
|
|
$(config.loading).hide ();
|
|
|
|
$select.enable ();
|
|
|
|
config.callbackAfter ();
|
|
|
|
},
|
|
|
|
"json"
|
|
|
|
);
|
2010-09-29 12:28:10 +02:00
|
|
|
});
|
2011-09-21 06:23:28 +02:00
|
|
|
});
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
$.extend ({
|
|
|
|
pandoraSelectGroupAgent: new _pandoraSelectGroupAgent(),
|
|
|
|
pandoraSelectGroupAgentDisabled: new _pandoraSelectGroupAgent(true),
|
2010-09-29 12:28:10 +02:00
|
|
|
});
|
|
|
|
|
2009-02-18 13:29:30 +01:00
|
|
|
$.extend ({
|
2009-03-17 16:15:55 +01:00
|
|
|
pandoraSelectAgentModule: new function() {
|
2009-02-18 13:29:30 +01:00
|
|
|
this.defaults = {
|
2009-02-23 17:23:58 +01:00
|
|
|
moduleSelect: "select#id_agent_module",
|
2009-03-17 16:15:55 +01:00
|
|
|
loading: "#module_loading",
|
2009-02-18 13:29:30 +01:00
|
|
|
callbackBefore: dummyFunc,
|
|
|
|
callbackPre: dummyFunc,
|
|
|
|
callbackPost: dummyFunc,
|
|
|
|
callbackAfter: dummyFunc,
|
2009-05-28 16:06:32 +02:00
|
|
|
moduleFilter: 'disabled=0 AND delete_pending=0',
|
2009-02-18 13:29:30 +01:00
|
|
|
debug: false
|
|
|
|
};
|
|
|
|
|
|
|
|
/* public methods */
|
|
|
|
this.construct = function (settings) {
|
|
|
|
return this.each (function() {
|
|
|
|
this.config = {};
|
|
|
|
|
2009-03-17 16:15:55 +01:00
|
|
|
this.config = $.extend (this.config, $.pandoraSelectAgentModule.defaults, settings);
|
2009-02-18 13:29:30 +01:00
|
|
|
|
2009-02-23 17:23:58 +01:00
|
|
|
var config = this.config;
|
2009-02-18 13:29:30 +01:00
|
|
|
$(this).change (function () {
|
2009-02-23 17:23:58 +01:00
|
|
|
var $select = $(config.moduleSelect).disable ();
|
|
|
|
$(config.loading).show ();
|
2009-02-18 13:29:30 +01:00
|
|
|
$("option[value!=0]", $select).remove ();
|
2009-06-09 16:29:03 +02:00
|
|
|
if (! config.callbackBefore (this))
|
|
|
|
return;
|
2009-02-18 13:29:30 +01:00
|
|
|
jQuery.post ('ajax.php',
|
|
|
|
{"page": "operation/agentes/ver_agente",
|
|
|
|
"get_agent_modules_json": 1,
|
2009-03-17 16:15:55 +01:00
|
|
|
"id_agent": this.value,
|
|
|
|
"filter" : config.moduleFilter,
|
|
|
|
"fields" : "id_agente_modulo,nombre"
|
2009-02-18 13:29:30 +01:00
|
|
|
},
|
|
|
|
function (data) {
|
|
|
|
jQuery.each (data, function (i, value) {
|
|
|
|
config.callbackPre ();
|
2011-09-28 11:06:19 +02:00
|
|
|
// Get the selected item from hidden field
|
|
|
|
selected = $('#hidden-'+config.moduleSelect.attr('id')+'_selected').val();
|
|
|
|
if(selected == i) {
|
|
|
|
option = $("<option></option>")
|
|
|
|
.attr ("selected", "selected")
|
|
|
|
.attr ("value", value['id_agente_modulo'])
|
|
|
|
.html (js_html_entity_decode (value['nombre']));
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
option = $("<option></option>")
|
|
|
|
.attr ("value", value['id_agente_modulo'])
|
|
|
|
.html (js_html_entity_decode (value['nombre']));
|
|
|
|
}
|
2009-02-18 13:29:30 +01:00
|
|
|
config.callbackPost (i, value, option);
|
2009-02-23 17:23:58 +01:00
|
|
|
$(config.moduleSelect).append (option);
|
2009-02-18 13:29:30 +01:00
|
|
|
});
|
2009-02-23 17:23:58 +01:00
|
|
|
$(config.loading).hide ();
|
2009-02-18 13:29:30 +01:00
|
|
|
$select.enable ();
|
|
|
|
config.callbackAfter ();
|
|
|
|
},
|
|
|
|
"json"
|
|
|
|
);
|
|
|
|
});
|
|
|
|
});
|
2011-09-28 11:06:19 +02:00
|
|
|
|
2009-02-18 13:29:30 +01:00
|
|
|
};
|
|
|
|
}
|
|
|
|
});
|
2009-03-17 16:15:55 +01:00
|
|
|
|
|
|
|
$.extend ({
|
|
|
|
pandoraSelectAgentAlert: new function() {
|
|
|
|
this.defaults = {
|
|
|
|
alertSelect: "select#id_agent_module",
|
|
|
|
loading: "#alert_loading",
|
|
|
|
callbackBefore: dummyFunc,
|
|
|
|
callbackPre: dummyFunc,
|
|
|
|
callbackPost: dummyFunc,
|
|
|
|
callbackAfter: dummyFunc,
|
|
|
|
debug: false
|
|
|
|
};
|
|
|
|
|
|
|
|
/* public methods */
|
|
|
|
this.construct = function (settings) {
|
|
|
|
return this.each (function() {
|
|
|
|
this.config = {};
|
|
|
|
|
|
|
|
this.config = $.extend (this.config, $.pandoraSelectAgentAlert.defaults, settings);
|
|
|
|
|
|
|
|
var config = this.config;
|
|
|
|
|
|
|
|
$(this).change (function () {
|
|
|
|
var $select = $(config.alertSelect).disable ();
|
|
|
|
$(config.loading).show ();
|
|
|
|
$("option[value!=0]", $select).remove ();
|
2009-06-09 16:29:03 +02:00
|
|
|
if (! config.callbackBefore (this))
|
|
|
|
return;
|
2009-03-17 16:15:55 +01:00
|
|
|
|
|
|
|
jQuery.post ('ajax.php',
|
2010-04-07 17:32:11 +02:00
|
|
|
{"page": "include/ajax/alert_list.ajax",
|
2009-03-17 16:15:55 +01:00
|
|
|
"get_agent_alerts_simple": 1,
|
|
|
|
"id_agent": this.value
|
|
|
|
},
|
|
|
|
function (data) {
|
|
|
|
jQuery.each (data, function (i, value) {
|
|
|
|
config.callbackPre ();
|
|
|
|
option = $("<option></option>")
|
|
|
|
.attr ("value", value['id'])
|
2010-03-08 13:49:49 +01:00
|
|
|
.html (js_html_entity_decode (value['template']['name']))
|
|
|
|
.append (" ("+js_html_entity_decode (value['module_name'])+")");
|
2009-03-17 16:15:55 +01:00
|
|
|
config.callbackPost (i, value, option);
|
|
|
|
$(config.alertSelect).append (option);
|
|
|
|
});
|
|
|
|
$(config.loading).hide ();
|
|
|
|
$select.enable ();
|
|
|
|
config.callbackAfter ();
|
|
|
|
},
|
|
|
|
"json"
|
|
|
|
);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
};
|
|
|
|
}
|
|
|
|
});
|
2009-04-13 Esteban Sanchez <estebans@artica.es>
* general/footer.php: Removed Firefox icon. Style correction.
* godmode/agentes/agent_manager.php: Replaced > with ». Style
correction when setting bold attributes.
* godmode/agentes/manage_config_remote.php,
godmode/agentes/modificar_agente.php, godmode/agentes/module_manager.php,
godmode/alerts/alert_list.php, godmode/db/db_audit.php,
godmode/db/db_event.php, godmode/db/db_info.php, godmode/db/db_main.php,
godmode/db/db_purge.php, godmode/db/db_refine.php,
godmode/groups/configure_group.php, godmode/groups/group_list.php,
godmode/modules/manage_nc_groups.php,
godmode/modules/manage_network_components.php,
godmode/modules/manage_network_templates.php,
godmode/modules/manage_network_templates_form.php,
godmode/modules/module_list.php, godmode/profiles/profile_list.php,
godmode/reporting/graph_builder.php, godmode/reporting/map_builder.php,
godmode/reporting/reporting_builder.php, godmode/servers/manage_export.php,
godmode/servers/manage_export_form.php,
godmode/servers/manage_recontask.php,
godmode/servers/manage_recontask_form.php,
godmode/servers/modificar_server.php, godmode/setup/setup_visuals.php,
godmode/setup/links.php, godmode/setup/news.php,
godmode/snmpconsole/snmp_alert.php, godmode/users/configure_user.php,
godmode/users/user_list.php, operation/agentes/alerts_status.php,
operation/agentes/estado_generalagente.php,
operation/agentes/estado_agente.php, operation/agentes/estado_grupo.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/exportdata.php, operation/agentes/networkmap.php,
operation/agentes/status_monitor.php, operation/agentes/tactical.php,
operation/events/events.php, operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/incidents/incident_statistics.php,
operation/messages/message.php, operation/reporting/custom_reporting.php,
operation/reporting/graph_viewer.php,
operation/reporting/reporting_viewer.php, operation/servers/view_server.php,
operation/users/user.php, operation/users/user_edit.php,
operation/users/user_statistics.php, operation/visual_console/index.php,
godmode/agentes/agent_template.php: Replaced > with »
* operation/agentes/datos_agente.php: Return instead of exit
* include/javascript/jquery.pandora.controls.js: Added pandoraSelectOS
control to preview the OS icon on a select.
* include/functions_reports.php: Fixed a bug on delete_report() that
returns error when the report has no content.
* include/functions_ui.php: Removed border attribute on print_os_icon().
Some fixes to meta refresh element on process_page_head(). Fixed
format_filesize() when length is zero.
* godmode/menu.php: Replaced link to file manager. Added enterprise hook.
* godmode/setup/file_manager.php: Renamed from obfuscated name filemgr.php
* include/styles/pandora.css: Textarea width reduced to 99%
* godmode/setup/setup.php: Added get_os_icon AJAX operation.
* images/mimetypes/, images/mimetypes/zip.png, images/mimetypes/image.png,
images/mimetypes/unknown.png, images/mimetypes/directory.png: Added to
repository. Mime type icons.
* extras/pandoradb_migrate_v2.x_to_v3.0.sql: Removed date comments.
* include/functions_filemanager.php: Added to repository. Minimal API for
file manager system.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1608 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-04-13 11:50:56 +02:00
|
|
|
|
|
|
|
$.extend ({
|
|
|
|
pandoraSelectOS: new function() {
|
|
|
|
this.defaults = {
|
2009-04-20 16:00:27 +02:00
|
|
|
alertSelect: "select#id_os",
|
2009-04-13 Esteban Sanchez <estebans@artica.es>
* general/footer.php: Removed Firefox icon. Style correction.
* godmode/agentes/agent_manager.php: Replaced > with ». Style
correction when setting bold attributes.
* godmode/agentes/manage_config_remote.php,
godmode/agentes/modificar_agente.php, godmode/agentes/module_manager.php,
godmode/alerts/alert_list.php, godmode/db/db_audit.php,
godmode/db/db_event.php, godmode/db/db_info.php, godmode/db/db_main.php,
godmode/db/db_purge.php, godmode/db/db_refine.php,
godmode/groups/configure_group.php, godmode/groups/group_list.php,
godmode/modules/manage_nc_groups.php,
godmode/modules/manage_network_components.php,
godmode/modules/manage_network_templates.php,
godmode/modules/manage_network_templates_form.php,
godmode/modules/module_list.php, godmode/profiles/profile_list.php,
godmode/reporting/graph_builder.php, godmode/reporting/map_builder.php,
godmode/reporting/reporting_builder.php, godmode/servers/manage_export.php,
godmode/servers/manage_export_form.php,
godmode/servers/manage_recontask.php,
godmode/servers/manage_recontask_form.php,
godmode/servers/modificar_server.php, godmode/setup/setup_visuals.php,
godmode/setup/links.php, godmode/setup/news.php,
godmode/snmpconsole/snmp_alert.php, godmode/users/configure_user.php,
godmode/users/user_list.php, operation/agentes/alerts_status.php,
operation/agentes/estado_generalagente.php,
operation/agentes/estado_agente.php, operation/agentes/estado_grupo.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/exportdata.php, operation/agentes/networkmap.php,
operation/agentes/status_monitor.php, operation/agentes/tactical.php,
operation/events/events.php, operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/incidents/incident_statistics.php,
operation/messages/message.php, operation/reporting/custom_reporting.php,
operation/reporting/graph_viewer.php,
operation/reporting/reporting_viewer.php, operation/servers/view_server.php,
operation/users/user.php, operation/users/user_edit.php,
operation/users/user_statistics.php, operation/visual_console/index.php,
godmode/agentes/agent_template.php: Replaced > with »
* operation/agentes/datos_agente.php: Return instead of exit
* include/javascript/jquery.pandora.controls.js: Added pandoraSelectOS
control to preview the OS icon on a select.
* include/functions_reports.php: Fixed a bug on delete_report() that
returns error when the report has no content.
* include/functions_ui.php: Removed border attribute on print_os_icon().
Some fixes to meta refresh element on process_page_head(). Fixed
format_filesize() when length is zero.
* godmode/menu.php: Replaced link to file manager. Added enterprise hook.
* godmode/setup/file_manager.php: Renamed from obfuscated name filemgr.php
* include/styles/pandora.css: Textarea width reduced to 99%
* godmode/setup/setup.php: Added get_os_icon AJAX operation.
* images/mimetypes/, images/mimetypes/zip.png, images/mimetypes/image.png,
images/mimetypes/unknown.png, images/mimetypes/directory.png: Added to
repository. Mime type icons.
* extras/pandoradb_migrate_v2.x_to_v3.0.sql: Removed date comments.
* include/functions_filemanager.php: Added to repository. Minimal API for
file manager system.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1608 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-04-13 11:50:56 +02:00
|
|
|
spanPreview: "#os_preview",
|
|
|
|
debug: false
|
|
|
|
};
|
|
|
|
|
|
|
|
/* public methods */
|
|
|
|
this.construct = function (settings) {
|
|
|
|
return this.each (function() {
|
|
|
|
this.config = {};
|
|
|
|
this.config = $.extend (this.config, $.pandoraSelectOS.defaults, settings);
|
|
|
|
|
|
|
|
var config = this.config;
|
|
|
|
|
|
|
|
$(this).change (function () {
|
|
|
|
var id_os = this.value;
|
|
|
|
|
2012-12-12 20:37:35 +01:00
|
|
|
var home_url;
|
|
|
|
if (typeof(settings) == 'undefined')
|
|
|
|
home_url = './';
|
|
|
|
else
|
|
|
|
home_url = settings.home_url;
|
|
|
|
|
2009-04-13 Esteban Sanchez <estebans@artica.es>
* general/footer.php: Removed Firefox icon. Style correction.
* godmode/agentes/agent_manager.php: Replaced > with ». Style
correction when setting bold attributes.
* godmode/agentes/manage_config_remote.php,
godmode/agentes/modificar_agente.php, godmode/agentes/module_manager.php,
godmode/alerts/alert_list.php, godmode/db/db_audit.php,
godmode/db/db_event.php, godmode/db/db_info.php, godmode/db/db_main.php,
godmode/db/db_purge.php, godmode/db/db_refine.php,
godmode/groups/configure_group.php, godmode/groups/group_list.php,
godmode/modules/manage_nc_groups.php,
godmode/modules/manage_network_components.php,
godmode/modules/manage_network_templates.php,
godmode/modules/manage_network_templates_form.php,
godmode/modules/module_list.php, godmode/profiles/profile_list.php,
godmode/reporting/graph_builder.php, godmode/reporting/map_builder.php,
godmode/reporting/reporting_builder.php, godmode/servers/manage_export.php,
godmode/servers/manage_export_form.php,
godmode/servers/manage_recontask.php,
godmode/servers/manage_recontask_form.php,
godmode/servers/modificar_server.php, godmode/setup/setup_visuals.php,
godmode/setup/links.php, godmode/setup/news.php,
godmode/snmpconsole/snmp_alert.php, godmode/users/configure_user.php,
godmode/users/user_list.php, operation/agentes/alerts_status.php,
operation/agentes/estado_generalagente.php,
operation/agentes/estado_agente.php, operation/agentes/estado_grupo.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/exportdata.php, operation/agentes/networkmap.php,
operation/agentes/status_monitor.php, operation/agentes/tactical.php,
operation/events/events.php, operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/incidents/incident_statistics.php,
operation/messages/message.php, operation/reporting/custom_reporting.php,
operation/reporting/graph_viewer.php,
operation/reporting/reporting_viewer.php, operation/servers/view_server.php,
operation/users/user.php, operation/users/user_edit.php,
operation/users/user_statistics.php, operation/visual_console/index.php,
godmode/agentes/agent_template.php: Replaced > with »
* operation/agentes/datos_agente.php: Return instead of exit
* include/javascript/jquery.pandora.controls.js: Added pandoraSelectOS
control to preview the OS icon on a select.
* include/functions_reports.php: Fixed a bug on delete_report() that
returns error when the report has no content.
* include/functions_ui.php: Removed border attribute on print_os_icon().
Some fixes to meta refresh element on process_page_head(). Fixed
format_filesize() when length is zero.
* godmode/menu.php: Replaced link to file manager. Added enterprise hook.
* godmode/setup/file_manager.php: Renamed from obfuscated name filemgr.php
* include/styles/pandora.css: Textarea width reduced to 99%
* godmode/setup/setup.php: Added get_os_icon AJAX operation.
* images/mimetypes/, images/mimetypes/zip.png, images/mimetypes/image.png,
images/mimetypes/unknown.png, images/mimetypes/directory.png: Added to
repository. Mime type icons.
* extras/pandoradb_migrate_v2.x_to_v3.0.sql: Removed date comments.
* include/functions_filemanager.php: Added to repository. Minimal API for
file manager system.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1608 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-04-13 11:50:56 +02:00
|
|
|
$(config.spanPreview).fadeOut ('fast', function () {
|
|
|
|
$("img", config.spanPreview).remove ();
|
2012-12-12 20:37:35 +01:00
|
|
|
jQuery.post (home_url + 'ajax.php',
|
2009-04-13 Esteban Sanchez <estebans@artica.es>
* general/footer.php: Removed Firefox icon. Style correction.
* godmode/agentes/agent_manager.php: Replaced > with ». Style
correction when setting bold attributes.
* godmode/agentes/manage_config_remote.php,
godmode/agentes/modificar_agente.php, godmode/agentes/module_manager.php,
godmode/alerts/alert_list.php, godmode/db/db_audit.php,
godmode/db/db_event.php, godmode/db/db_info.php, godmode/db/db_main.php,
godmode/db/db_purge.php, godmode/db/db_refine.php,
godmode/groups/configure_group.php, godmode/groups/group_list.php,
godmode/modules/manage_nc_groups.php,
godmode/modules/manage_network_components.php,
godmode/modules/manage_network_templates.php,
godmode/modules/manage_network_templates_form.php,
godmode/modules/module_list.php, godmode/profiles/profile_list.php,
godmode/reporting/graph_builder.php, godmode/reporting/map_builder.php,
godmode/reporting/reporting_builder.php, godmode/servers/manage_export.php,
godmode/servers/manage_export_form.php,
godmode/servers/manage_recontask.php,
godmode/servers/manage_recontask_form.php,
godmode/servers/modificar_server.php, godmode/setup/setup_visuals.php,
godmode/setup/links.php, godmode/setup/news.php,
godmode/snmpconsole/snmp_alert.php, godmode/users/configure_user.php,
godmode/users/user_list.php, operation/agentes/alerts_status.php,
operation/agentes/estado_generalagente.php,
operation/agentes/estado_agente.php, operation/agentes/estado_grupo.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/exportdata.php, operation/agentes/networkmap.php,
operation/agentes/status_monitor.php, operation/agentes/tactical.php,
operation/events/events.php, operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/incidents/incident_statistics.php,
operation/messages/message.php, operation/reporting/custom_reporting.php,
operation/reporting/graph_viewer.php,
operation/reporting/reporting_viewer.php, operation/servers/view_server.php,
operation/users/user.php, operation/users/user_edit.php,
operation/users/user_statistics.php, operation/visual_console/index.php,
godmode/agentes/agent_template.php: Replaced > with »
* operation/agentes/datos_agente.php: Return instead of exit
* include/javascript/jquery.pandora.controls.js: Added pandoraSelectOS
control to preview the OS icon on a select.
* include/functions_reports.php: Fixed a bug on delete_report() that
returns error when the report has no content.
* include/functions_ui.php: Removed border attribute on print_os_icon().
Some fixes to meta refresh element on process_page_head(). Fixed
format_filesize() when length is zero.
* godmode/menu.php: Replaced link to file manager. Added enterprise hook.
* godmode/setup/file_manager.php: Renamed from obfuscated name filemgr.php
* include/styles/pandora.css: Textarea width reduced to 99%
* godmode/setup/setup.php: Added get_os_icon AJAX operation.
* images/mimetypes/, images/mimetypes/zip.png, images/mimetypes/image.png,
images/mimetypes/unknown.png, images/mimetypes/directory.png: Added to
repository. Mime type icons.
* extras/pandoradb_migrate_v2.x_to_v3.0.sql: Removed date comments.
* include/functions_filemanager.php: Added to repository. Minimal API for
file manager system.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1608 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-04-13 11:50:56 +02:00
|
|
|
{"page": "godmode/setup/setup",
|
|
|
|
"get_os_icon": 1,
|
|
|
|
"id_os": id_os
|
|
|
|
},
|
|
|
|
function (data) {
|
|
|
|
$(config.spanPreview)
|
|
|
|
.append (data)
|
|
|
|
.fadeIn ('fast');
|
|
|
|
},
|
|
|
|
"html"
|
|
|
|
);
|
|
|
|
});
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
|
};
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2009-04-20 16:00:27 +02:00
|
|
|
$.extend ({
|
2009-04-22 12:46:05 +02:00
|
|
|
pandoraSelectGroupIcon: new function() {
|
2009-04-20 16:00:27 +02:00
|
|
|
this.defaults = {
|
|
|
|
alertSelect: "select#id_group",
|
|
|
|
spanPreview: "#group_preview",
|
|
|
|
debug: false
|
|
|
|
};
|
|
|
|
|
|
|
|
/* public methods */
|
|
|
|
this.construct = function (settings) {
|
|
|
|
return this.each (function() {
|
|
|
|
this.config = {};
|
2009-04-22 12:46:05 +02:00
|
|
|
this.config = $.extend (this.config, $.pandoraSelectGroupIcon.defaults, settings);
|
2009-04-20 16:00:27 +02:00
|
|
|
|
|
|
|
var config = this.config;
|
|
|
|
|
|
|
|
$(this).change (function () {
|
|
|
|
var id_group = this.value;
|
|
|
|
|
|
|
|
$(config.spanPreview).fadeOut ('fast', function () {
|
|
|
|
$("img", config.spanPreview).remove ();
|
|
|
|
jQuery.post ('ajax.php',
|
|
|
|
{"page": "godmode/groups/group_list",
|
|
|
|
"get_group_json": 1,
|
|
|
|
"id_group": id_group
|
|
|
|
},
|
|
|
|
function (data) {
|
2010-10-25 Miguel de Dios <miguel.dedios@artica.es>
* include/javascript/jquery.pandora.controls.js,
include/javascript/tiny_mce/plugins/media/js/media.js,
include/javascript/tiny_mce/plugins/table/editor_plugin.js,
include/javascript/tiny_mce/plugins/table/js/cell.js,
include/javascript/tiny_mce/plugins/xhtmlxtras/js/element_common.js,
include/javascript/tiny_mce/themes/advanced/js/color_picker.js,
include/javascript/tiny_mce/themes/advanced/js/image.js,
include/javascript/jquery.pandora.js,
include/javascript/jquery.tablesorter.js,
include/javascript/OpenLayers/OpenLayers.js,
include/javascript/jquery.form.js, include/javascript/jquery.timeentry.js,
include/javascript/jquery.countdown.js,
godmode/reporting/visual_console_builder.editor.js: fixed end of lines that
it haven't semicolon end char.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3461 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-10-25 18:06:37 +02:00
|
|
|
img = $("<img />").attr ("src", "images/groups_small/"+data["icon"]+".png");
|
2009-04-20 16:00:27 +02:00
|
|
|
$(config.spanPreview)
|
|
|
|
.append (img)
|
|
|
|
.fadeIn ('fast');
|
|
|
|
},
|
|
|
|
"json"
|
|
|
|
);
|
|
|
|
});
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
|
};
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2009-02-16 17:23:30 +01:00
|
|
|
$.fn.extend({
|
2009-04-22 12:46:05 +02:00
|
|
|
pandoraSelectGroupAgent: $.pandoraSelectGroupAgent.construct,
|
2010-09-29 12:28:10 +02:00
|
|
|
pandoraSelectGroupAgentDisabled: $.pandoraSelectGroupAgentDisabled.construct,
|
2009-03-17 16:15:55 +01:00
|
|
|
pandoraSelectAgentModule: $.pandoraSelectAgentModule.construct,
|
2009-04-13 Esteban Sanchez <estebans@artica.es>
* general/footer.php: Removed Firefox icon. Style correction.
* godmode/agentes/agent_manager.php: Replaced > with ». Style
correction when setting bold attributes.
* godmode/agentes/manage_config_remote.php,
godmode/agentes/modificar_agente.php, godmode/agentes/module_manager.php,
godmode/alerts/alert_list.php, godmode/db/db_audit.php,
godmode/db/db_event.php, godmode/db/db_info.php, godmode/db/db_main.php,
godmode/db/db_purge.php, godmode/db/db_refine.php,
godmode/groups/configure_group.php, godmode/groups/group_list.php,
godmode/modules/manage_nc_groups.php,
godmode/modules/manage_network_components.php,
godmode/modules/manage_network_templates.php,
godmode/modules/manage_network_templates_form.php,
godmode/modules/module_list.php, godmode/profiles/profile_list.php,
godmode/reporting/graph_builder.php, godmode/reporting/map_builder.php,
godmode/reporting/reporting_builder.php, godmode/servers/manage_export.php,
godmode/servers/manage_export_form.php,
godmode/servers/manage_recontask.php,
godmode/servers/manage_recontask_form.php,
godmode/servers/modificar_server.php, godmode/setup/setup_visuals.php,
godmode/setup/links.php, godmode/setup/news.php,
godmode/snmpconsole/snmp_alert.php, godmode/users/configure_user.php,
godmode/users/user_list.php, operation/agentes/alerts_status.php,
operation/agentes/estado_generalagente.php,
operation/agentes/estado_agente.php, operation/agentes/estado_grupo.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/exportdata.php, operation/agentes/networkmap.php,
operation/agentes/status_monitor.php, operation/agentes/tactical.php,
operation/events/events.php, operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/incidents/incident_statistics.php,
operation/messages/message.php, operation/reporting/custom_reporting.php,
operation/reporting/graph_viewer.php,
operation/reporting/reporting_viewer.php, operation/servers/view_server.php,
operation/users/user.php, operation/users/user_edit.php,
operation/users/user_statistics.php, operation/visual_console/index.php,
godmode/agentes/agent_template.php: Replaced > with »
* operation/agentes/datos_agente.php: Return instead of exit
* include/javascript/jquery.pandora.controls.js: Added pandoraSelectOS
control to preview the OS icon on a select.
* include/functions_reports.php: Fixed a bug on delete_report() that
returns error when the report has no content.
* include/functions_ui.php: Removed border attribute on print_os_icon().
Some fixes to meta refresh element on process_page_head(). Fixed
format_filesize() when length is zero.
* godmode/menu.php: Replaced link to file manager. Added enterprise hook.
* godmode/setup/file_manager.php: Renamed from obfuscated name filemgr.php
* include/styles/pandora.css: Textarea width reduced to 99%
* godmode/setup/setup.php: Added get_os_icon AJAX operation.
* images/mimetypes/, images/mimetypes/zip.png, images/mimetypes/image.png,
images/mimetypes/unknown.png, images/mimetypes/directory.png: Added to
repository. Mime type icons.
* extras/pandoradb_migrate_v2.x_to_v3.0.sql: Removed date comments.
* include/functions_filemanager.php: Added to repository. Minimal API for
file manager system.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1608 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-04-13 11:50:56 +02:00
|
|
|
pandoraSelectAgentAlert: $.pandoraSelectAgentAlert.construct,
|
2009-04-20 16:00:27 +02:00
|
|
|
pandoraSelectOS: $.pandoraSelectOS.construct,
|
2009-04-22 12:46:05 +02:00
|
|
|
pandoraSelectGroupIcon: $.pandoraSelectGroupIcon.construct
|
2009-02-16 17:23:30 +01:00
|
|
|
});
|
2009-03-13 12:22:07 +01:00
|
|
|
}) (jQuery);
|