mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
added check for element
This commit is contained in:
parent
002509500c
commit
315e522b2e
@ -1340,115 +1340,117 @@ $(document).ready (function () {
|
|||||||
var type_name_selected = type_names[type_selected];
|
var type_name_selected = type_names[type_selected];
|
||||||
var element = document.getElementById("module_type_help");
|
var element = document.getElementById("module_type_help");
|
||||||
var language = "<?php echo $config['language']; ?>" ;
|
var language = "<?php echo $config['language']; ?>" ;
|
||||||
element.onclick = function (event) {
|
if (typeof element !== 'undefined' && element !== null) {
|
||||||
if(type_name_selected == 'async_data' ||
|
element.onclick = function (event) {
|
||||||
type_name_selected == 'async_proc' ||
|
if(type_name_selected == 'async_data' ||
|
||||||
type_name_selected == 'async_string' ||
|
type_name_selected == 'async_proc' ||
|
||||||
type_name_selected == 'generic_proc'||
|
type_name_selected == 'async_string' ||
|
||||||
type_name_selected == 'generic_data' ||
|
type_name_selected == 'generic_proc'||
|
||||||
type_name_selected == 'generic_data_inc' ||
|
type_name_selected == 'generic_data' ||
|
||||||
type_name_selected == 'generic_data_inc_abs'||
|
type_name_selected == 'generic_data_inc' ||
|
||||||
type_name_selected == 'generic_data_string' ||
|
type_name_selected == 'generic_data_inc_abs'||
|
||||||
type_name_selected == 'keep_alive'
|
type_name_selected == 'generic_data_string' ||
|
||||||
){
|
type_name_selected == 'keep_alive'
|
||||||
if (language == 'es'){
|
){
|
||||||
window.open(
|
if (language == 'es'){
|
||||||
'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_es:Operacion&printable=yes#Tipos_de_m.C3.B3dulos',
|
window.open(
|
||||||
'_blank',
|
'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_es:Operacion&printable=yes#Tipos_de_m.C3.B3dulos',
|
||||||
'width=800,height=600'
|
'_blank',
|
||||||
);
|
'width=800,height=600'
|
||||||
}
|
);
|
||||||
else{
|
|
||||||
window.open(
|
|
||||||
'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_en:Operations&printable=yes#Types_of_Modules',
|
|
||||||
'_blank',
|
|
||||||
'width=800,height=600'
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
if(type_name_selected == 'remote_icmp' ||
|
|
||||||
type_name_selected == 'remote_icmp_proc'
|
|
||||||
){
|
|
||||||
if(language == 'es'){
|
|
||||||
window.open(
|
|
||||||
'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_es:Monitorizacion_remota&printable=yes#Monitorizaci.C3.B3n_ICMP',
|
|
||||||
'_blank',
|
|
||||||
'width=800,height=600'
|
|
||||||
);
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
window.open(
|
|
||||||
'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_en:Remote_Monitoring&printable=yes#ICMP_Monitoring',
|
|
||||||
'_blank',
|
|
||||||
'width=800,height=600'
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
if(type_name_selected == 'remote_snmp_string' ||
|
|
||||||
type_name_selected == 'remote_snmp_proc' ||
|
|
||||||
type_name_selected == 'remote_snmp_inc' ||
|
|
||||||
type_name_selected == 'remote_snmp'
|
|
||||||
){
|
|
||||||
if(language == 'es'){
|
|
||||||
window.open(
|
|
||||||
'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_es:Monitorizacion_remota&printable=yes#Monitorizando_con_m.C3.B3dulos_de_red_tipo_SNMP',
|
|
||||||
'_blank',
|
|
||||||
'width=800,height=600'
|
|
||||||
);
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
window.open(
|
|
||||||
'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_en:Remote_Monitoring&printable=yes#Monitoring_by_Network_Modules_with_SNMP',
|
|
||||||
'_blank',
|
|
||||||
'width=800,height=600'
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
if(type_name_selected == 'remote_tcp_string' ||
|
|
||||||
type_name_selected == 'remote_tcp_proc' ||
|
|
||||||
type_name_selected == 'remote_tcp_inc' ||
|
|
||||||
type_name_selected == 'remote_tcp'
|
|
||||||
){
|
|
||||||
if(language == 'es'){
|
|
||||||
window.open(
|
|
||||||
'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_es:Monitorizacion_remota&printable=yes#Monitorizaci.C3.B3n_TCP',
|
|
||||||
'_blank',
|
|
||||||
'width=800,height=600'
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
window.open(
|
window.open(
|
||||||
'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_en:Remote_Monitoring&printable=yes#TCP_Monitoring',
|
'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_en:Operations&printable=yes#Types_of_Modules',
|
||||||
'_blank',
|
'_blank',
|
||||||
'width=800,height=600'
|
'width=800,height=600'
|
||||||
);
|
);
|
||||||
}
|
|
||||||
}
|
|
||||||
if(type_name_selected == 'web_data' ||
|
|
||||||
type_name_selected == 'web_proc' ||
|
|
||||||
type_name_selected == 'web_content_data' ||
|
|
||||||
type_name_selected == 'web_content_string'
|
|
||||||
){
|
|
||||||
if(language == 'es'){
|
|
||||||
window.open(
|
|
||||||
'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_es:Monitorizacion_web&printable=yes#Creaci.C3.B3n_de_m.C3.B3dulos_web',
|
|
||||||
'_blank',
|
|
||||||
'width=800,height=600'
|
|
||||||
);
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
window.open(
|
|
||||||
'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_en:Web_Monitoring&printable=yes#Creating_Web_Modules',
|
|
||||||
'_blank',
|
|
||||||
'width=800,height=600'
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
if(type_name_selected == 'remote_icmp' ||
|
||||||
|
type_name_selected == 'remote_icmp_proc'
|
||||||
|
){
|
||||||
|
if(language == 'es'){
|
||||||
|
window.open(
|
||||||
|
'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_es:Monitorizacion_remota&printable=yes#Monitorizaci.C3.B3n_ICMP',
|
||||||
|
'_blank',
|
||||||
|
'width=800,height=600'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
window.open(
|
||||||
|
'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_en:Remote_Monitoring&printable=yes#ICMP_Monitoring',
|
||||||
|
'_blank',
|
||||||
|
'width=800,height=600'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
if(type_name_selected == 'remote_snmp_string' ||
|
||||||
|
type_name_selected == 'remote_snmp_proc' ||
|
||||||
|
type_name_selected == 'remote_snmp_inc' ||
|
||||||
|
type_name_selected == 'remote_snmp'
|
||||||
|
){
|
||||||
|
if(language == 'es'){
|
||||||
|
window.open(
|
||||||
|
'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_es:Monitorizacion_remota&printable=yes#Monitorizando_con_m.C3.B3dulos_de_red_tipo_SNMP',
|
||||||
|
'_blank',
|
||||||
|
'width=800,height=600'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
window.open(
|
||||||
|
'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_en:Remote_Monitoring&printable=yes#Monitoring_by_Network_Modules_with_SNMP',
|
||||||
|
'_blank',
|
||||||
|
'width=800,height=600'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
if(type_name_selected == 'remote_tcp_string' ||
|
||||||
|
type_name_selected == 'remote_tcp_proc' ||
|
||||||
|
type_name_selected == 'remote_tcp_inc' ||
|
||||||
|
type_name_selected == 'remote_tcp'
|
||||||
|
){
|
||||||
|
if(language == 'es'){
|
||||||
|
window.open(
|
||||||
|
'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_es:Monitorizacion_remota&printable=yes#Monitorizaci.C3.B3n_TCP',
|
||||||
|
'_blank',
|
||||||
|
'width=800,height=600'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
window.open(
|
||||||
|
'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_en:Remote_Monitoring&printable=yes#TCP_Monitoring',
|
||||||
|
'_blank',
|
||||||
|
'width=800,height=600'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(type_name_selected == 'web_data' ||
|
||||||
|
type_name_selected == 'web_proc' ||
|
||||||
|
type_name_selected == 'web_content_data' ||
|
||||||
|
type_name_selected == 'web_content_string'
|
||||||
|
){
|
||||||
|
if(language == 'es'){
|
||||||
|
window.open(
|
||||||
|
'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_es:Monitorizacion_web&printable=yes#Creaci.C3.B3n_de_m.C3.B3dulos_web',
|
||||||
|
'_blank',
|
||||||
|
'width=800,height=600'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
window.open(
|
||||||
|
'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_en:Web_Monitoring&printable=yes#Creating_Web_Modules',
|
||||||
|
'_blank',
|
||||||
|
'width=800,height=600'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -386,121 +386,124 @@ $next_row++;
|
|||||||
console.log(type_name_selected);
|
console.log(type_name_selected);
|
||||||
var element = document.getElementById("module_type_help");
|
var element = document.getElementById("module_type_help");
|
||||||
var language = "<?php echo $config['language']; ?>" ;
|
var language = "<?php echo $config['language']; ?>" ;
|
||||||
element.onclick = function (event) {
|
|
||||||
if(type_name_selected == 'async_data' ||
|
if (typeof element !== 'undefined' && element !== null) {
|
||||||
type_name_selected == 'async_proc' ||
|
element.onclick = function (event) {
|
||||||
type_name_selected == 'async_string' ||
|
if(type_name_selected == 'async_data' ||
|
||||||
type_name_selected == 'generic_proc'||
|
type_name_selected == 'async_proc' ||
|
||||||
type_name_selected == 'generic_data' ||
|
type_name_selected == 'async_string' ||
|
||||||
type_name_selected == 'generic_data_inc' ||
|
type_name_selected == 'generic_proc'||
|
||||||
type_name_selected == 'generic_data_inc_abs'||
|
type_name_selected == 'generic_data' ||
|
||||||
type_name_selected == 'generic_data_string' ||
|
type_name_selected == 'generic_data_inc' ||
|
||||||
type_name_selected == 'keep_alive'
|
type_name_selected == 'generic_data_inc_abs'||
|
||||||
){
|
type_name_selected == 'generic_data_string' ||
|
||||||
if (language == 'es'){
|
type_name_selected == 'keep_alive'
|
||||||
window.open(
|
){
|
||||||
'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_es:Operacion&printable=yes#Tipos_de_m.C3.B3dulos',
|
if (language == 'es'){
|
||||||
'_blank',
|
window.open(
|
||||||
'width=800,height=600'
|
'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_es:Operacion&printable=yes#Tipos_de_m.C3.B3dulos',
|
||||||
);
|
'_blank',
|
||||||
}
|
'width=800,height=600'
|
||||||
else{
|
);
|
||||||
window.open(
|
}
|
||||||
'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_en:Operations&printable=yes#Types_of_Modules',
|
else{
|
||||||
'_blank',
|
window.open(
|
||||||
'width=800,height=600'
|
'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_en:Operations&printable=yes#Types_of_Modules',
|
||||||
);
|
'_blank',
|
||||||
}
|
'width=800,height=600'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
if(type_name_selected == 'remote_icmp' ||
|
||||||
|
type_name_selected == 'remote_icmp_proc'
|
||||||
|
){
|
||||||
|
if(language == 'es'){
|
||||||
|
window.open(
|
||||||
|
'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_es:Monitorizacion_remota&printable=yes#Monitorizaci.C3.B3n_ICMP',
|
||||||
|
'_blank',
|
||||||
|
'width=800,height=600'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
window.open(
|
||||||
|
'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_en:Remote_Monitoring&printable=yes#ICMP_Monitoring',
|
||||||
|
'_blank',
|
||||||
|
'width=800,height=600'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
if(type_name_selected == 'remote_snmp_string' ||
|
||||||
|
type_name_selected == 'remote_snmp_proc' ||
|
||||||
|
type_name_selected == 'remote_snmp_inc' ||
|
||||||
|
type_name_selected == 'remote_snmp'
|
||||||
|
){
|
||||||
|
if(language == 'es'){
|
||||||
|
window.open(
|
||||||
|
'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_es:Monitorizacion_remota&printable=yes#Monitorizando_con_m.C3.B3dulos_de_red_tipo_SNMP',
|
||||||
|
'_blank',
|
||||||
|
'width=800,height=600'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
window.open(
|
||||||
|
'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_en:Remote_Monitoring&printable=yes#Monitoring_by_Network_Modules_with_SNMP',
|
||||||
|
'_blank',
|
||||||
|
'width=800,height=600'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
if(type_name_selected == 'remote_tcp_string' ||
|
||||||
|
type_name_selected == 'remote_tcp_proc' ||
|
||||||
|
type_name_selected == 'remote_tcp_inc' ||
|
||||||
|
type_name_selected == 'remote_tcp'
|
||||||
|
){
|
||||||
|
if(language == 'es'){
|
||||||
|
window.open(
|
||||||
|
'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_es:Monitorizacion_remota&printable=yes#Monitorizaci.C3.B3n_TCP',
|
||||||
|
'_blank',
|
||||||
|
'width=800,height=600'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
window.open(
|
||||||
|
'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_en:Remote_Monitoring&printable=yes#TCP_Monitoring',
|
||||||
|
'_blank',
|
||||||
|
'width=800,height=600'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
if(type_name_selected == 'web_data' ||
|
||||||
|
type_name_selected == 'web_proc' ||
|
||||||
|
type_name_selected == 'web_content_data' ||
|
||||||
|
type_name_selected == 'web_content_string'
|
||||||
|
){
|
||||||
|
if(language == 'es'){
|
||||||
|
window.open(
|
||||||
|
'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_es:Monitorizacion_web&printable=yes#Creaci.C3.B3n_de_m.C3.B3dulos_web',
|
||||||
|
'_blank',
|
||||||
|
'width=800,height=600'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
window.open(
|
||||||
|
'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_en:Web_Monitoring&printable=yes#Creating_Web_Modules',
|
||||||
|
'_blank',
|
||||||
|
'width=800,height=600'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if(type_name_selected == 'remote_icmp' ||
|
|
||||||
type_name_selected == 'remote_icmp_proc'
|
|
||||||
){
|
|
||||||
if(language == 'es'){
|
|
||||||
window.open(
|
|
||||||
'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_es:Monitorizacion_remota&printable=yes#Monitorizaci.C3.B3n_ICMP',
|
|
||||||
'_blank',
|
|
||||||
'width=800,height=600'
|
|
||||||
);
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
window.open(
|
|
||||||
'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_en:Remote_Monitoring&printable=yes#ICMP_Monitoring',
|
|
||||||
'_blank',
|
|
||||||
'width=800,height=600'
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
if(type_name_selected == 'remote_snmp_string' ||
|
|
||||||
type_name_selected == 'remote_snmp_proc' ||
|
|
||||||
type_name_selected == 'remote_snmp_inc' ||
|
|
||||||
type_name_selected == 'remote_snmp'
|
|
||||||
){
|
|
||||||
if(language == 'es'){
|
|
||||||
window.open(
|
|
||||||
'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_es:Monitorizacion_remota&printable=yes#Monitorizando_con_m.C3.B3dulos_de_red_tipo_SNMP',
|
|
||||||
'_blank',
|
|
||||||
'width=800,height=600'
|
|
||||||
);
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
window.open(
|
|
||||||
'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_en:Remote_Monitoring&printable=yes#Monitoring_by_Network_Modules_with_SNMP',
|
|
||||||
'_blank',
|
|
||||||
'width=800,height=600'
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
if(type_name_selected == 'remote_tcp_string' ||
|
|
||||||
type_name_selected == 'remote_tcp_proc' ||
|
|
||||||
type_name_selected == 'remote_tcp_inc' ||
|
|
||||||
type_name_selected == 'remote_tcp'
|
|
||||||
){
|
|
||||||
if(language == 'es'){
|
|
||||||
window.open(
|
|
||||||
'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_es:Monitorizacion_remota&printable=yes#Monitorizaci.C3.B3n_TCP',
|
|
||||||
'_blank',
|
|
||||||
'width=800,height=600'
|
|
||||||
);
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
window.open(
|
|
||||||
'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_en:Remote_Monitoring&printable=yes#TCP_Monitoring',
|
|
||||||
'_blank',
|
|
||||||
'width=800,height=600'
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
if(type_name_selected == 'web_data' ||
|
|
||||||
type_name_selected == 'web_proc' ||
|
|
||||||
type_name_selected == 'web_content_data' ||
|
|
||||||
type_name_selected == 'web_content_string'
|
|
||||||
){
|
|
||||||
if(language == 'es'){
|
|
||||||
window.open(
|
|
||||||
'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_es:Monitorizacion_web&printable=yes#Creaci.C3.B3n_de_m.C3.B3dulos_web',
|
|
||||||
'_blank',
|
|
||||||
'width=800,height=600'
|
|
||||||
);
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
window.open(
|
|
||||||
'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_en:Web_Monitoring&printable=yes#Creating_Web_Modules',
|
|
||||||
'_blank',
|
|
||||||
'width=800,height=600'
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (type_name_selected.match(/_string$/) == null) {
|
if (type_name_selected.match(/_string$/) == null) {
|
||||||
// Numeric types
|
// Numeric types
|
||||||
|
Loading…
x
Reference in New Issue
Block a user