Merge remote-tracking branch 'origin/develop' into ent-7063-Informes-de-servicio-en-Meta
Conflicts: pandora_console/godmode/reporting/reporting_builder.item_editor.php
This commit is contained in:
commit
1dd9ff568e
|
@ -1,5 +1,5 @@
|
|||
package: pandorafms-agent-unix
|
||||
Version: 7.0NG.759-220207
|
||||
Version: 7.0NG.759-220208
|
||||
Architecture: all
|
||||
Priority: optional
|
||||
Section: admin
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
pandora_version="7.0NG.759-220207"
|
||||
pandora_version="7.0NG.759-220208"
|
||||
|
||||
echo "Test if you has the tools for to make the packages."
|
||||
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null
|
||||
|
|
|
@ -1015,7 +1015,7 @@ my $Sem = undef;
|
|||
my $ThreadSem = undef;
|
||||
|
||||
use constant AGENT_VERSION => '7.0NG.759';
|
||||
use constant AGENT_BUILD => '220207';
|
||||
use constant AGENT_BUILD => '220208';
|
||||
|
||||
# Agent log default file size maximum and instances
|
||||
use constant DEFAULT_MAX_LOG_SIZE => 600000;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_agent_unix
|
||||
%define version 7.0NG.759
|
||||
%define release 220207
|
||||
%define release 220208
|
||||
|
||||
Summary: Pandora FMS Linux agent, PERL version
|
||||
Name: %{name}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_agent_unix
|
||||
%define version 7.0NG.759
|
||||
%define release 220207
|
||||
%define release 220208
|
||||
|
||||
Summary: Pandora FMS Linux agent, PERL version
|
||||
Name: %{name}
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
# **********************************************************************
|
||||
|
||||
PI_VERSION="7.0NG.759"
|
||||
PI_BUILD="220207"
|
||||
PI_BUILD="220208"
|
||||
OS_NAME=`uname -s`
|
||||
|
||||
FORCE=0
|
||||
|
|
|
@ -186,7 +186,7 @@ UpgradeApplicationID
|
|||
{}
|
||||
|
||||
Version
|
||||
{220207}
|
||||
{220208}
|
||||
|
||||
ViewReadme
|
||||
{Yes}
|
||||
|
|
|
@ -30,7 +30,7 @@ using namespace Pandora;
|
|||
using namespace Pandora_Strutils;
|
||||
|
||||
#define PATH_SIZE _MAX_PATH+1
|
||||
#define PANDORA_VERSION ("7.0NG.759 Build 220207")
|
||||
#define PANDORA_VERSION ("7.0NG.759 Build 220208")
|
||||
|
||||
string pandora_path;
|
||||
string pandora_dir;
|
||||
|
|
|
@ -11,7 +11,7 @@ BEGIN
|
|||
VALUE "LegalCopyright", "Artica ST"
|
||||
VALUE "OriginalFilename", "PandoraAgent.exe"
|
||||
VALUE "ProductName", "Pandora FMS Windows Agent"
|
||||
VALUE "ProductVersion", "(7.0NG.759(Build 220207))"
|
||||
VALUE "ProductVersion", "(7.0NG.759(Build 220208))"
|
||||
VALUE "FileVersion", "1.0.0.0"
|
||||
END
|
||||
END
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
package: pandorafms-console
|
||||
Version: 7.0NG.759-220207
|
||||
Version: 7.0NG.759-220208
|
||||
Architecture: all
|
||||
Priority: optional
|
||||
Section: admin
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
pandora_version="7.0NG.759-220207"
|
||||
pandora_version="7.0NG.759-220208"
|
||||
|
||||
package_pear=0
|
||||
package_pandora=1
|
||||
|
|
|
@ -3,4 +3,15 @@ ALTER TABLE `tpolicy_queue` MODIFY COLUMN `progress` int(10) NOT NULL default '0
|
|||
CREATE INDEX `IDX_tservice_element` ON `tservice_element`(`id_service`,`id_agente_modulo`);
|
||||
ALTER TABLE tevent_response ADD COLUMN display_command tinyint(1) default 0;
|
||||
|
||||
ALTER TABLE `talert_templates` ADD COLUMN `schedule` TEXT;
|
||||
ALTER TABLE `tevent_alert` ADD COLUMN `schedule` TEXT;
|
||||
|
||||
SOURCE procedures/alertTemplates.sql;
|
||||
CALL `migrateRanges`();
|
||||
DROP PROCEDURE `migrateRanges`;
|
||||
|
||||
SOURCE procedures/alertEvents.sql;
|
||||
CALL `migrateEventRanges`();
|
||||
DROP PROCEDURE `migrateEventRanges`;
|
||||
|
||||
COMMIT;
|
|
@ -0,0 +1,40 @@
|
|||
|
||||
CREATE PROCEDURE migrateEventRanges()
|
||||
BEGIN
|
||||
DECLARE done INT DEFAULT FALSE;
|
||||
DECLARE i INT;
|
||||
DECLARE r TEXT;
|
||||
DECLARE cur1 CURSOR FOR SELECT `id` FROM `tevent_alert`;
|
||||
DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = TRUE;
|
||||
|
||||
UPDATE `tevent_alert` SET `schedule` = '{"monday":_1_,"tuesday":_2_,"wednesday":_3_,"thursday":_4_,"friday":_5_,"saturday":_6_,"sunday":_7_}';
|
||||
UPDATE `tevent_alert` SET `time_from` = "00:00:00", `time_to` = "00:00:00" WHERE `time_from` = `time_to`;
|
||||
|
||||
OPEN cur1;
|
||||
read_loop: LOOP
|
||||
FETCH cur1 INTO i;
|
||||
|
||||
IF done THEN
|
||||
LEAVE read_loop;
|
||||
END IF;
|
||||
|
||||
SELECT concat('[{"start":"', `time_from`, '","end":"', `time_to`, '"}]') into r FROM `tevent_alert` WHERE `id` = i;
|
||||
|
||||
UPDATE `tevent_alert` SET `schedule` = REPLACE(`schedule`, "_1_", r) WHERE `monday` > 0 AND `id` = i;
|
||||
UPDATE `tevent_alert` SET `schedule` = REPLACE(`schedule`, "_2_", r) WHERE `tuesday` > 0 AND `id` = i;
|
||||
UPDATE `tevent_alert` SET `schedule` = REPLACE(`schedule`, "_3_", r) WHERE `wednesday` > 0 AND `id` = i;
|
||||
UPDATE `tevent_alert` SET `schedule` = REPLACE(`schedule`, "_4_", r) WHERE `thursday` > 0 AND `id` = i;
|
||||
UPDATE `tevent_alert` SET `schedule` = REPLACE(`schedule`, "_5_", r) WHERE `friday` > 0 AND `id` = i;
|
||||
UPDATE `tevent_alert` SET `schedule` = REPLACE(`schedule`, "_6_", r) WHERE `saturday` > 0 AND `id` = i;
|
||||
UPDATE `tevent_alert` SET `schedule` = REPLACE(`schedule`, "_7_", r) WHERE `sunday` > 0 AND `id` = i;
|
||||
|
||||
UPDATE `tevent_alert` SET `schedule` = REPLACE(`schedule`, "_1_", '""') WHERE `monday` = 0 AND `id` = i;
|
||||
UPDATE `tevent_alert` SET `schedule` = REPLACE(`schedule`, "_2_", '""') WHERE `tuesday` = 0 AND `id` = i;
|
||||
UPDATE `tevent_alert` SET `schedule` = REPLACE(`schedule`, "_3_", '""') WHERE `wednesday` = 0 AND `id` = i;
|
||||
UPDATE `tevent_alert` SET `schedule` = REPLACE(`schedule`, "_4_", '""') WHERE `thursday` = 0 AND `id` = i;
|
||||
UPDATE `tevent_alert` SET `schedule` = REPLACE(`schedule`, "_5_", '""') WHERE `friday` = 0 AND `id` = i;
|
||||
UPDATE `tevent_alert` SET `schedule` = REPLACE(`schedule`, "_6_", '""') WHERE `saturday` = 0 AND `id` = i;
|
||||
UPDATE `tevent_alert` SET `schedule` = REPLACE(`schedule`, "_7_", '""') WHERE `sunday` = 0 AND `id` = i;
|
||||
END LOOP;
|
||||
CLOSE cur1;
|
||||
END ;
|
|
@ -0,0 +1,40 @@
|
|||
|
||||
CREATE PROCEDURE migrateRanges()
|
||||
BEGIN
|
||||
DECLARE done INT DEFAULT FALSE;
|
||||
DECLARE i INT;
|
||||
DECLARE r TEXT;
|
||||
DECLARE cur1 CURSOR FOR SELECT `id` FROM `talert_templates`;
|
||||
DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = TRUE;
|
||||
|
||||
UPDATE `talert_templates` SET `schedule` = '{"monday":_1_,"tuesday":_2_,"wednesday":_3_,"thursday":_4_,"friday":_5_,"saturday":_6_,"sunday":_7_}';
|
||||
UPDATE `talert_templates` SET `time_from` = "00:00:00", `time_to` = "00:00:00" WHERE `time_from` = `time_to`;
|
||||
|
||||
OPEN cur1;
|
||||
read_loop: LOOP
|
||||
FETCH cur1 INTO i;
|
||||
|
||||
IF done THEN
|
||||
LEAVE read_loop;
|
||||
END IF;
|
||||
|
||||
SELECT concat('[{"start":"', `time_from`, '","end":"', `time_to`, '"}]') into r FROM `talert_templates` WHERE `id` = i;
|
||||
|
||||
UPDATE `talert_templates` SET `schedule` = REPLACE(`schedule`, "_1_", r) WHERE `monday` > 0 AND `id` = i;
|
||||
UPDATE `talert_templates` SET `schedule` = REPLACE(`schedule`, "_2_", r) WHERE `tuesday` > 0 AND `id` = i;
|
||||
UPDATE `talert_templates` SET `schedule` = REPLACE(`schedule`, "_3_", r) WHERE `wednesday` > 0 AND `id` = i;
|
||||
UPDATE `talert_templates` SET `schedule` = REPLACE(`schedule`, "_4_", r) WHERE `thursday` > 0 AND `id` = i;
|
||||
UPDATE `talert_templates` SET `schedule` = REPLACE(`schedule`, "_5_", r) WHERE `friday` > 0 AND `id` = i;
|
||||
UPDATE `talert_templates` SET `schedule` = REPLACE(`schedule`, "_6_", r) WHERE `saturday` > 0 AND `id` = i;
|
||||
UPDATE `talert_templates` SET `schedule` = REPLACE(`schedule`, "_7_", r) WHERE `sunday` > 0 AND `id` = i;
|
||||
|
||||
UPDATE `talert_templates` SET `schedule` = REPLACE(`schedule`, "_1_", '""') WHERE `monday` = 0 AND `id` = i;
|
||||
UPDATE `talert_templates` SET `schedule` = REPLACE(`schedule`, "_2_", '""') WHERE `tuesday` = 0 AND `id` = i;
|
||||
UPDATE `talert_templates` SET `schedule` = REPLACE(`schedule`, "_3_", '""') WHERE `wednesday` = 0 AND `id` = i;
|
||||
UPDATE `talert_templates` SET `schedule` = REPLACE(`schedule`, "_4_", '""') WHERE `thursday` = 0 AND `id` = i;
|
||||
UPDATE `talert_templates` SET `schedule` = REPLACE(`schedule`, "_5_", '""') WHERE `friday` = 0 AND `id` = i;
|
||||
UPDATE `talert_templates` SET `schedule` = REPLACE(`schedule`, "_6_", '""') WHERE `saturday` = 0 AND `id` = i;
|
||||
UPDATE `talert_templates` SET `schedule` = REPLACE(`schedule`, "_7_", '""') WHERE `sunday` = 0 AND `id` = i;
|
||||
END LOOP;
|
||||
CLOSE cur1;
|
||||
END ;
|
|
@ -715,6 +715,7 @@ ALTER TABLE `tevent_alert` ADD COLUMN `id_template_conditions` int(10) unsigned
|
|||
ALTER TABLE `tevent_alert` ADD COLUMN `id_template_fields` int(10) unsigned NOT NULL default 0;
|
||||
ALTER TABLE `tevent_alert` ADD COLUMN `last_evaluation` bigint(20) NOT NULL default 0;
|
||||
ALTER TABLE `tevent_alert` ADD COLUMN `pool_occurrences` int unsigned not null default 0;
|
||||
ALTER TABLE `tevent_alert` ADD COLUMN `schedule` TEXT;
|
||||
|
||||
-- -----------------------------------------------------
|
||||
-- Table `tevent_alert_action`
|
||||
|
@ -1317,6 +1318,7 @@ ALTER TABLE talert_templates ADD COLUMN `field18_recovery` TEXT NOT NULL DEFAULT
|
|||
ALTER TABLE talert_templates ADD COLUMN `field19_recovery` TEXT NOT NULL DEFAULT "";
|
||||
ALTER TABLE talert_templates ADD COLUMN `field20_recovery` TEXT NOT NULL DEFAULT "";
|
||||
ALTER TABLE `talert_templates` ADD COLUMN `disable_event` tinyint(1) DEFAULT 0;
|
||||
ALTER TABLE `talert_templates` ADD COLUMN `schedule` TEXT;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- Table `talert_snmp`
|
||||
|
@ -1451,13 +1453,13 @@ ALTER TABLE `ttag` MODIFY COLUMN `name` text NOT NULL default '';
|
|||
INSERT INTO `tconfig` (`token`, `value`) VALUES ('big_operation_step_datos_purge', '100');
|
||||
INSERT INTO `tconfig` (`token`, `value`) VALUES ('small_operation_step_datos_purge', '1000');
|
||||
INSERT INTO `tconfig` (`token`, `value`) VALUES ('days_autodisable_deletion', '30');
|
||||
INSERT INTO `tconfig` (`token`, `value`) VALUES ('MR', 51);
|
||||
INSERT INTO `tconfig` (`token`, `value`) VALUES ('MR', 52);
|
||||
INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_docs_logo', 'default_docs.png');
|
||||
INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_support_logo', 'default_support.png');
|
||||
INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_logo_white_bg_preview', 'pandora_logo_head_white_bg.png');
|
||||
UPDATE tconfig SET value = 'https://licensing.artica.es/pandoraupdate7/server.php' WHERE token='url_update_manager';
|
||||
DELETE FROM `tconfig` WHERE `token` = 'current_package_enterprise';
|
||||
INSERT INTO `tconfig` (`token`, `value`) VALUES ('current_package', 759);
|
||||
INSERT INTO `tconfig` (`token`, `value`) VALUES ('current_package', 760);
|
||||
INSERT INTO `tconfig` (`token`, `value`) VALUES ('status_monitor_fields', 'policy,agent,data_type,module_name,server_type,interval,status,graph,warn,data,timestamp');
|
||||
UPDATE `tconfig` SET `value` = 'mini_severity,evento,id_agente,estado,timestamp' WHERE `token` LIKE 'event_fields';
|
||||
DELETE FROM `tconfig` WHERE `token` LIKE 'integria_api_password';
|
||||
|
|
|
@ -1,17 +1,32 @@
|
|||
<?php
|
||||
/**
|
||||
* Alerts details for agent.
|
||||
*
|
||||
* @category Alert
|
||||
* @package Pandora FMS
|
||||
* @subpackage Community
|
||||
* @version 1.0.0
|
||||
* @license See below
|
||||
*
|
||||
* ______ ___ _______ _______ ________
|
||||
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
|
||||
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
|
||||
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
|
||||
*
|
||||
* ============================================================================
|
||||
* Copyright (c) 2005-2022 Artica Soluciones Tecnologicas
|
||||
* Please see http://pandorafms.org for full contribution list
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation for version 2.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
* ============================================================================
|
||||
*/
|
||||
|
||||
// Pandora FMS - http://pandorafms.com
|
||||
// ==================================================
|
||||
// Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
|
||||
// Please see http://pandorafms.org for full contribution list
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation for version 2.
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
// Load global vars
|
||||
// Load global vars.
|
||||
global $config;
|
||||
|
||||
check_login();
|
||||
|
@ -28,7 +43,7 @@ if (! check_acl($config['id_user'], 0, 'LM')) {
|
|||
enterprise_include_once('include/functions_policies.php');
|
||||
|
||||
$id_alert = get_parameter('id_alert', 0);
|
||||
// ID given as parameter
|
||||
// ID given as parameter.
|
||||
$alert = alerts_get_alert_agent_module($id_alert);
|
||||
$template = alerts_get_alert_template($alert['id_alert_template']);
|
||||
$actions = alerts_get_alert_agent_module_actions($id_alert);
|
||||
|
@ -36,19 +51,27 @@ $agent_alias = modules_get_agentmodule_agent_alias($alert['id_agent_module']);
|
|||
$agent = modules_get_agentmodule_agent($alert['id_agent_module']);
|
||||
$module_name = modules_get_agentmodule_name($alert['id_agent_module']);
|
||||
|
||||
// Default action
|
||||
// Default action.
|
||||
$default_action = $template['id_alert_action'];
|
||||
if ($default_action != 0) {
|
||||
$default_action = alerts_get_alert_action($default_action);
|
||||
$default_action['name'] .= ' '.'('.__('Default').')';
|
||||
$default_action['name'] .= ' ('.__('Default').')';
|
||||
$default_action['default'] = 1;
|
||||
$default_action['module_action_threshold'] = '0';
|
||||
}
|
||||
|
||||
// Header
|
||||
ui_print_page_header(__('Alert details'), 'images/op_alerts.png', false, '', false, '');
|
||||
// Header.
|
||||
ui_print_page_header(
|
||||
__('Alert details'),
|
||||
'images/op_alerts.png',
|
||||
false,
|
||||
'',
|
||||
false,
|
||||
''
|
||||
);
|
||||
|
||||
// TABLE DETAILS
|
||||
// TABLE DETAILS.
|
||||
$table_details = new stdClass;
|
||||
$table_details->class = 'databox';
|
||||
$table_details->width = '100%';
|
||||
$table_details->size = [];
|
||||
|
@ -103,7 +126,7 @@ $data[1] = '<span title="'.$priorities[$template['priority']].'" class="'.get_pr
|
|||
$table_details->data[] = $data;
|
||||
|
||||
$data[0] = __('Stand by');
|
||||
$data[1] = $alert['standby'] == 1 ? __('Yes') : __('No');
|
||||
$data[1] = ($alert['standby'] == 1) ? __('Yes') : __('No');
|
||||
$table_details->data[] = $data;
|
||||
|
||||
if (enterprise_installed() && $alert['id_policy_alerts'] != 0) {
|
||||
|
@ -113,7 +136,13 @@ if (enterprise_installed() && $alert['id_policy_alerts'] != 0) {
|
|||
} else {
|
||||
$img = 'images/policies_mc.png';
|
||||
|
||||
$policy = '<a href="?sec=gmodules&sec2=enterprise/godmode/policies/policies&id='.$policyInfo['id'].'">'.html_print_image($img, true, ['title' => $policyInfo['name']]).'</a>';
|
||||
$policy = '<a href="?sec=gmodules&sec2=enterprise/godmode/policies/policies&id='.$policyInfo['id'].'">';
|
||||
$policy .= html_print_image(
|
||||
$img,
|
||||
true,
|
||||
['title' => $policyInfo['name']]
|
||||
);
|
||||
$policy .= '</a>';
|
||||
}
|
||||
|
||||
$data[0] = __('Policy');
|
||||
|
@ -121,8 +150,7 @@ if (enterprise_installed() && $alert['id_policy_alerts'] != 0) {
|
|||
$table_details->data[] = $data;
|
||||
}
|
||||
|
||||
// TABLE DETAILS END
|
||||
// TABLE CONDITIONS
|
||||
$table_conditions = new stdClass;
|
||||
$table_conditions->class = 'databox';
|
||||
$table_conditions->width = '100%';
|
||||
$table_conditions->size = [];
|
||||
|
@ -155,9 +183,13 @@ switch ($template['type']) {
|
|||
|
||||
case 'max_min':
|
||||
if ($template['matches_value']) {
|
||||
$condition = __('The alert would fire when the value is between <span id="min"></span> and <span id="max"></span>');
|
||||
$condition = __(
|
||||
'The alert would fire when the value is between <span id="min"></span> and <span id="max"></span>'
|
||||
);
|
||||
} else {
|
||||
$condition = __('The alert would fire when the value is not between <span id="min"></span> and <span id="max"></span>');
|
||||
$condition = __(
|
||||
'The alert would fire when the value is not between <span id="min"></span> and <span id="max"></span>'
|
||||
);
|
||||
}
|
||||
|
||||
$condition = str_replace('<span id="min"></span>', $template['min_value'], $condition);
|
||||
|
@ -200,111 +232,27 @@ switch ($template['type']) {
|
|||
|
||||
case 'always':
|
||||
$condition = __('Always');
|
||||
break;
|
||||
|
||||
default:
|
||||
// Not possible.
|
||||
break;
|
||||
}
|
||||
|
||||
$data[0] = $condition;
|
||||
|
||||
$table_conditions->data[] = $data;
|
||||
|
||||
// DAYS
|
||||
$table_days->class = 'databox alert_days';
|
||||
$table_days->width = '100%';
|
||||
$table_days->size = [];
|
||||
$table_days->data = [];
|
||||
$table_days->style = [];
|
||||
$table_days->styleTable = 'padding: 1px; margin: 0px; text-align: center; height: 80px;';
|
||||
$table_days->head[0] = __('Mon');
|
||||
$table_days->head[1] = __('Tue');
|
||||
$table_days->head[2] = __('Wed');
|
||||
$table_days->head[3] = __('Thu');
|
||||
$table_days->head[4] = __('Fri');
|
||||
$table_days->head[5] = __('Sat');
|
||||
$table_days->head[6] = __('Sun');
|
||||
$table_days->data[0] = array_fill(0, 7, html_print_image('images/blade.png', true));
|
||||
$table_conditions->colspan[1][0] = 2;
|
||||
$schedule = io_safe_output(
|
||||
$template['schedule']
|
||||
);
|
||||
|
||||
$days = [];
|
||||
if ($template['monday']) {
|
||||
$table_days->data[0][0] = html_print_image('images/tick.png', true, ['class' => 'invert_filter']);
|
||||
}
|
||||
|
||||
if ($template['tuesday']) {
|
||||
$table_days->data[0][1] = html_print_image('images/tick.png', true, ['class' => 'invert_filter']);
|
||||
}
|
||||
|
||||
if ($template['wednesday']) {
|
||||
$table_days->data[0][2] = html_print_image('images/tick.png', true, ['class' => 'invert_filter']);
|
||||
}
|
||||
|
||||
if ($template['thursday']) {
|
||||
$table_days->data[0][3] = html_print_image('images/tick.png', true, ['class' => 'invert_filter']);
|
||||
}
|
||||
|
||||
if ($template['friday']) {
|
||||
$table_days->data[0][4] = html_print_image('images/tick.png', true, ['class' => 'invert_filter']);
|
||||
}
|
||||
|
||||
if ($template['saturday']) {
|
||||
$table_days->data[0][5] = html_print_image('images/tick.png', true, ['class' => 'invert_filter']);
|
||||
}
|
||||
|
||||
if ($template['sunday']) {
|
||||
$table_days->data[0][6] = html_print_image('images/tick.png', true, ['class' => 'invert_filter']);
|
||||
}
|
||||
|
||||
$data[0] = html_print_table($table_days, true);
|
||||
unset($table_days);
|
||||
|
||||
// TIME
|
||||
$table_time->class = 'databox alert_time';
|
||||
$table_time->width = '100%';
|
||||
$table_time->size = [];
|
||||
$table_time->data = [];
|
||||
$table_time->style = [];
|
||||
$table_time->styleTable = 'padding: 1px; margin: 0px; text-align: center; height: 80px; width: 100%;';
|
||||
|
||||
// $data[0] = __('Time from') . ' / ' . __('Time to');
|
||||
if ($template['time_from'] == $template['time_to']) {
|
||||
$table_time->head[0] = '00:00:00<br>-<br>23:59:59';
|
||||
$table_time->data[0][0] = html_print_image('images/tick.png', true, ['class' => 'invert_filter']);
|
||||
} else {
|
||||
$from_array = explode(':', $template['time_from']);
|
||||
$from = ($from_array[0] * SECONDS_1HOUR + $from_array[1] * SECONDS_1MINUTE + $from_array[2]);
|
||||
$to_array = explode(':', $template['time_to']);
|
||||
$to = ($to_array[0] * SECONDS_1HOUR + $to_array[1] * SECONDS_1MINUTE + $to_array[2]);
|
||||
if ($to > $from) {
|
||||
if ($template['time_from'] != '00:00:00') {
|
||||
$table_time->head[0] = '00:00:00<br>-<br>'.$template['time_from'];
|
||||
$table_time->data[0][0] = html_print_image('images/blade.png', true);
|
||||
}
|
||||
|
||||
$table_time->head[1] = $template['time_from'].'<br>-<br>'.$template['time_to'];
|
||||
$table_time->data[0][1] = html_print_image('images/tick.png', true, ['class' => 'invert_filter']);
|
||||
|
||||
if ($template['time_to'] != '23:59:59') {
|
||||
$table_time->head[2] = $template['time_to'].'<br>-<br>23:59:59';
|
||||
$table_time->data[0][2] = html_print_image('images/blade.png', true);
|
||||
}
|
||||
} else {
|
||||
if ($template['time_to'] != '00:00:00') {
|
||||
$table_time->head[0] = '00:00:00<br>-<br>'.$template['time_to'];
|
||||
$table_time->data[0][0] = html_print_image('images/tick.png', true, ['class' => 'invert_filter']);
|
||||
}
|
||||
|
||||
$table_time->head[1] = $template['time_to'].'<br>-<br>'.$template['time_from'];
|
||||
$table_time->data[0][1] = html_print_image('images/blade.png', true, ['class' => 'invert_filter']);
|
||||
|
||||
if ($template['time_from'] != '23:59:59') {
|
||||
$table_time->head[2] = $template['time_from'].'<br>-<br>23:59:59';
|
||||
$table_time->data[0][2] = html_print_image('images/tick.png', true, ['class' => 'invert_filter']);
|
||||
}
|
||||
}
|
||||
|
||||
$data[1] = $template['time_from'].' / '.$template['time_to'];
|
||||
}
|
||||
|
||||
$data[1] = html_print_table($table_time, true);
|
||||
unset($table_time);
|
||||
$data[0] = '';
|
||||
$data[0] .= html_print_input_hidden('schedule', $schedule, true);
|
||||
$data[0] .= '<div id="calendar_map"></div>';
|
||||
|
||||
$data[1] = '';
|
||||
$table_conditions->data[] = $data;
|
||||
|
||||
$data[0] = __('Use special days list');
|
||||
|
@ -319,7 +267,8 @@ $data[0] = __('Number of alerts').' ('.__('Min').'/'.__('Max').')';
|
|||
$data[1] = $template['min_alerts'].'/'.$template['max_alerts'];
|
||||
$table_conditions->data[] = $data;
|
||||
|
||||
// TABLE CONDITIONS END
|
||||
// TABLE CONDITIONS END.
|
||||
$table = new stdClass;
|
||||
$table->class = 'alert_list databox';
|
||||
$table->width = '98%';
|
||||
$table->size = [];
|
||||
|
@ -339,7 +288,8 @@ unset($table);
|
|||
|
||||
$actions = alerts_get_actions_escalation($actions, $default_action);
|
||||
|
||||
// ESCALATION
|
||||
// ESCALATION.
|
||||
$table = new stdClass;
|
||||
$table->class = 'alert_list databox alternate alert_escalation';
|
||||
$table->width = '98%';
|
||||
$table->size = [];
|
||||
|
@ -354,19 +304,33 @@ $table->style[0] = 'font-weight: bold; text-align: left;';
|
|||
if (count($actions) == 1 && isset($actions[0])) {
|
||||
$table->head[1] = __('Every time that the alert is fired');
|
||||
$table->data[0][0] = $actions[0]['name'];
|
||||
$table->data[0][1] = html_print_image('images/tick.png', true, ['class' => 'invert_filter']);
|
||||
$table->data[0][1] = html_print_image(
|
||||
'images/tick.png',
|
||||
true,
|
||||
['class' => 'invert_filter']
|
||||
);
|
||||
} else {
|
||||
foreach ($actions as $kaction => $action) {
|
||||
$table->data[$kaction][0] = $action['name'];
|
||||
if ($kaction == 0) {
|
||||
$table->data[$kaction][0] .= ui_print_help_tip(__('The default actions will be executed every time that the alert is fired and no other action is executed'), true);
|
||||
if ((int) $kaction === 0) {
|
||||
$table->data[$kaction][0] .= ui_print_help_tip(
|
||||
__('The default actions will be executed every time that the alert is fired and no other action is executed'),
|
||||
true
|
||||
);
|
||||
}
|
||||
|
||||
foreach ($action['escalation'] as $k => $v) {
|
||||
if ($v > 0) {
|
||||
$table->data[$kaction][$k] = html_print_image('images/tick.png', true, ['class' => 'invert_filter']);
|
||||
$table->data[$kaction][$k] = html_print_image(
|
||||
'images/tick.png',
|
||||
true,
|
||||
['class' => 'invert_filter']
|
||||
);
|
||||
} else {
|
||||
$table->data[$kaction][$k] = html_print_image('images/blade.png', true);
|
||||
$table->data[$kaction][$k] = html_print_image(
|
||||
'images/blade.png',
|
||||
true
|
||||
);
|
||||
}
|
||||
|
||||
if (count($table->head) <= count($action['escalation'])) {
|
||||
|
@ -382,12 +346,16 @@ if (count($actions) == 1 && isset($actions[0])) {
|
|||
}
|
||||
}
|
||||
|
||||
$action_threshold = $action['module_action_threshold'] > 0 ? $action['module_action_threshold'] : $action['action_threshold'];
|
||||
$action_threshold = ($action['module_action_threshold'] > 0) ? $action['module_action_threshold'] : $action['action_threshold'];
|
||||
|
||||
if ($action_threshold == 0) {
|
||||
$table->data[$kaction][($k + 1)] = __('No');
|
||||
} else {
|
||||
$table->data[$kaction][($k + 1)] = human_time_description_raw($action_threshold, true, 'tiny');
|
||||
$table->data[$kaction][($k + 1)] = human_time_description_raw(
|
||||
$action_threshold,
|
||||
true,
|
||||
'tiny'
|
||||
);
|
||||
}
|
||||
|
||||
$table->head[($k + 1)] = __('Threshold');
|
||||
|
@ -397,7 +365,8 @@ if (count($actions) == 1 && isset($actions[0])) {
|
|||
html_print_table($table);
|
||||
unset($table);
|
||||
echo '</div>';
|
||||
// ESCALATION TABLE
|
||||
// ESCALATION TABLE.
|
||||
$table = new stdClass;
|
||||
$table->class = 'alert_list databox';
|
||||
$table->width = '98%';
|
||||
$table->size = [];
|
||||
|
@ -405,7 +374,7 @@ $table->head = [];
|
|||
$table->data = [];
|
||||
$table->rowstyle[1] = 'font-weight: bold;';
|
||||
|
||||
if ($default_action != 0) {
|
||||
if ((int) $default_action != 0) {
|
||||
$actions_select[0] = $default_action['name'];
|
||||
}
|
||||
|
||||
|
@ -416,17 +385,43 @@ foreach ($actions as $kaction => $action) {
|
|||
$table->data[0][0] = __('Select the desired action and mode to see the Firing/Recovery fields for this action');
|
||||
$table->colspan[0][0] = 2;
|
||||
|
||||
$table->data[1][0] = __('Action').'<br>'.html_print_select($actions_select, 'firing_action_select', -1, '', __('Select the action'), -1, true, false, false);
|
||||
$table->data[1][0] = __('Action');
|
||||
$table->data[1][0] .= '<br>';
|
||||
$table->data[1][0] .= html_print_select(
|
||||
$actions_select,
|
||||
'firing_action_select',
|
||||
-1,
|
||||
'',
|
||||
__('Select the action'),
|
||||
-1,
|
||||
true,
|
||||
false,
|
||||
false
|
||||
);
|
||||
|
||||
$modes = [];
|
||||
$modes['firing'] = __('Firing');
|
||||
$modes['recovering'] = __('Recovering');
|
||||
|
||||
$table->data[1][1] = '<div class="action_details invisible" >'.__('Mode').'<br>'.html_print_select($modes, 'modes', 'firing', '', '', 0, true, false, false).'</div>';
|
||||
$table->data[1][1] = '<div class="action_details invisible" >';
|
||||
$table->data[1][1] .= __('Mode');
|
||||
$table->data[1][1] .= '<br>';
|
||||
$table->data[1][1] .= html_print_select(
|
||||
$modes,
|
||||
'modes',
|
||||
'firing',
|
||||
'',
|
||||
'',
|
||||
0,
|
||||
true,
|
||||
false,
|
||||
false
|
||||
);
|
||||
$table->data[1][1] .= '</div>';
|
||||
|
||||
html_print_table($table);
|
||||
unset($table);
|
||||
|
||||
$table = new stdClass;
|
||||
$table->class = 'alert_list databox alternate';
|
||||
$table->width = '98%';
|
||||
$table->size = [];
|
||||
|
@ -437,13 +432,33 @@ $table->style[1] = 'width: 30%;';
|
|||
$table->style[2] = 'width: 30%;';
|
||||
$table->style[3] = 'font-weight: bold; width: 30%;';
|
||||
|
||||
$table->title = __('Firing fields').ui_print_help_tip(__('Fields passed to the command executed by this action when the alert is fired'), true);
|
||||
$table->title = __('Firing fields');
|
||||
$table->title .= ui_print_help_tip(
|
||||
__('Fields passed to the command executed by this action when the alert is fired'),
|
||||
true
|
||||
);
|
||||
|
||||
$table->head[0] = __('Field').ui_print_help_tip(__('Fields configured on the command associated to the action'), true);
|
||||
$table->head[1] = __('Template fields').ui_print_help_tip(__('Triggering fields configured in template'), true);
|
||||
$table->head[2] = __('Action fields').ui_print_help_tip(__('Triggering fields configured in action'), true);
|
||||
$table->head[0] = __('Field');
|
||||
$table->head[0] .= ui_print_help_tip(
|
||||
__('Fields configured on the command associated to the action'),
|
||||
true
|
||||
);
|
||||
$table->head[1] = __('Template fields');
|
||||
$table->head[1] .= ui_print_help_tip(
|
||||
__('Triggering fields configured in template'),
|
||||
true
|
||||
);
|
||||
$table->head[2] = __('Action fields');
|
||||
$table->head[2] .= ui_print_help_tip(
|
||||
__('Triggering fields configured in action'),
|
||||
true
|
||||
);
|
||||
|
||||
$table->head[3] = __('Executed on firing').ui_print_help_tip(__('Fields used on execution when the alert is fired'), true);
|
||||
$table->head[3] = __('Executed on firing');
|
||||
$table->head[3] .= ui_print_help_tip(
|
||||
__('Fields used on execution when the alert is fired'),
|
||||
true
|
||||
);
|
||||
|
||||
$firing_fields = [];
|
||||
|
||||
|
@ -456,14 +471,12 @@ foreach ($actions as $kaction => $action) {
|
|||
$descriptions = json_decode($command['fields_descriptions'], true);
|
||||
|
||||
foreach ($descriptions as $kdesc => $desc) {
|
||||
if (empty($desc)) {
|
||||
// continue;
|
||||
}
|
||||
|
||||
$field = 'field'.($kdesc + 1);
|
||||
$data = [];
|
||||
$data[0] = $firing_fields[$kaction]['description'][$field] = $desc;
|
||||
if (!empty($data[0])) {
|
||||
$data[0] = $desc;
|
||||
$firing_fields[$kaction]['description'][$field] = $desc;
|
||||
|
||||
if (empty($data[0]) === false) {
|
||||
$data[0] = '<b>'.$data[0].'</b><br>';
|
||||
}
|
||||
|
||||
|
@ -473,12 +486,14 @@ foreach ($actions as $kaction => $action) {
|
|||
).')</span>';
|
||||
$data[1] = $template[$field];
|
||||
$data[2] = $action[$field];
|
||||
$data[3] = $firing_fields[$kaction]['value'][$field] = empty($action[$field]) ? $template[$field] : $action[$field];
|
||||
$data[3] = (empty($action[$field]) === true) ? $template[$field] : $action[$field];
|
||||
|
||||
$firing_fields[$kaction]['value'][$field] = (empty($action[$field]) === true) ? $template[$field] : $action[$field];
|
||||
|
||||
$first_level = $template[$field];
|
||||
$second_level = $action[$field];
|
||||
if (!empty($second_level) || !empty($first_level)) {
|
||||
if (empty($second_level)) {
|
||||
if (empty($second_level) === false || empty($first_level) === false) {
|
||||
if (empty($second_level) === false) {
|
||||
$table->cellclass[count($table->data)][1] = 'used_field';
|
||||
$table->cellclass[count($table->data)][2] = 'empty_field';
|
||||
} else {
|
||||
|
@ -493,7 +508,7 @@ foreach ($actions as $kaction => $action) {
|
|||
|
||||
$table->rowclass[] = 'firing_action firing_action_'.$kaction;
|
||||
|
||||
if ($command_preview != 'Internal type') {
|
||||
if ($command_preview !== 'Internal type') {
|
||||
$command_preview = str_replace('_'.$field.'_', $data[3], $command_preview);
|
||||
}
|
||||
}
|
||||
|
@ -504,20 +519,32 @@ foreach ($actions as $kaction => $action) {
|
|||
echo '<div class="mode_table mode_table_firing action_details invisible w100p">';
|
||||
|
||||
html_print_table($table);
|
||||
unset($table);
|
||||
|
||||
foreach ($actions as $kaction => $action) {
|
||||
echo '<div class="firing_action firing_action_'.$kaction.' invisible">';
|
||||
ui_print_info_message(['title' => __('Command preview'), 'message' => $firing_fields[$kaction]['command_preview'], 'no_close' => true]);
|
||||
ui_print_info_message(
|
||||
[
|
||||
'title' => __('Command preview'),
|
||||
'message' => $firing_fields[$kaction]['command_preview'],
|
||||
'no_close' => true,
|
||||
]
|
||||
);
|
||||
echo '</div>';
|
||||
}
|
||||
|
||||
echo '</div>';
|
||||
// Firing table
|
||||
// Firing table.
|
||||
echo '<div class="mode_table mode_table_recovering action_details invisible w100p" >';
|
||||
if ($template['recovery_notify'] == 0) {
|
||||
ui_print_info_message(['title' => __('Disabled'), 'message' => __('The alert recovering is disabled on this template.'), 'no_close' => true]);
|
||||
if ((int) $template['recovery_notify'] === 0) {
|
||||
ui_print_info_message(
|
||||
[
|
||||
'title' => __('Disabled'),
|
||||
'message' => __('The alert recovering is disabled on this template.'),
|
||||
'no_close' => true,
|
||||
]
|
||||
);
|
||||
} else {
|
||||
$table = new stdClass;
|
||||
$table->class = 'alert_list databox alternate';
|
||||
$table->width = '98%';
|
||||
$table->size = [];
|
||||
|
@ -528,13 +555,37 @@ if ($template['recovery_notify'] == 0) {
|
|||
$table->style[2] = 'width: 25%;';
|
||||
$table->style[3] = 'width: 25%;';
|
||||
$table->style[3] = 'font-weight: bold; width: 25%;';
|
||||
$table->title = __('Recovering fields').ui_print_help_tip(__('Fields passed to the command executed by this action when the alert is recovered'), true);
|
||||
$table->title = __('Recovering fields');
|
||||
$table->title .= ui_print_help_tip(
|
||||
__('Fields passed to the command executed by this action when the alert is recovered'),
|
||||
true
|
||||
);
|
||||
|
||||
$table->head[0] = __('Field').ui_print_help_tip(__('Fields configured on the command associated to the action'), true);
|
||||
$table->head[1] = __('Firing fields').ui_print_help_tip(__('Fields used on execution when the alert is fired'), true);
|
||||
$table->head[2] = __('Template recovery fields').ui_print_help_tip(__('Recovery fields configured in alert template'), true);
|
||||
$table->head[3] = __('Action recovery fields').ui_print_help_tip(__('Recovery fields configured in alert action'), true);
|
||||
$table->head[4] = __('Executed on recovery').ui_print_help_tip(__('Fields used on execution when the alert is recovered'), true);
|
||||
$table->head[0] = __('Field');
|
||||
$table->head[0] .= ui_print_help_tip(
|
||||
__('Fields configured on the command associated to the action'),
|
||||
true
|
||||
);
|
||||
$table->head[1] = __('Firing fields');
|
||||
$table->head[1] .= ui_print_help_tip(
|
||||
__('Fields used on execution when the alert is fired'),
|
||||
true
|
||||
);
|
||||
$table->head[2] = __('Template recovery fields');
|
||||
$table->head[2] .= ui_print_help_tip(
|
||||
__('Recovery fields configured in alert template'),
|
||||
true
|
||||
);
|
||||
$table->head[3] = __('Action recovery fields');
|
||||
$table->head[3] .= ui_print_help_tip(
|
||||
__('Recovery fields configured in alert action'),
|
||||
true
|
||||
);
|
||||
$table->head[4] = __('Executed on recovery');
|
||||
$table->head[4] .= ui_print_help_tip(
|
||||
__('Fields used on execution when the alert is recovered'),
|
||||
true
|
||||
);
|
||||
$table->style[4] = 'font-weight: bold;';
|
||||
|
||||
foreach ($firing_fields as $kaction => $firing) {
|
||||
|
@ -544,7 +595,7 @@ if ($template['recovery_notify'] == 0) {
|
|||
foreach ($firing['description'] as $field => $desc) {
|
||||
$data[0] = $desc;
|
||||
|
||||
if (!empty($data[0])) {
|
||||
if (empty($data[0]) === false) {
|
||||
$data[0] = '<b>'.$data[0].'</b><br>';
|
||||
}
|
||||
|
||||
|
@ -560,14 +611,14 @@ if ($template['recovery_notify'] == 0) {
|
|||
$first_level = $data[1];
|
||||
$second_level = $data[2];
|
||||
$third_level = $data[3];
|
||||
if (!empty($third_level) || !empty($second_level) || !empty($first_level)) {
|
||||
if (!empty($third_level)) {
|
||||
if (empty($third_level) === false || empty($second_level) === false || empty($first_level) === false) {
|
||||
if (empty($third_level) === false) {
|
||||
$table->cellclass[count($table->data)][1] = 'overrided_field';
|
||||
$table->cellclass[count($table->data)][2] = 'overrided_field';
|
||||
$table->cellclass[count($table->data)][3] = 'used_field';
|
||||
|
||||
$data[4] = $data[3];
|
||||
} else if (!empty($second_level)) {
|
||||
} else if (empty($second_level) === false) {
|
||||
$table->cellclass[count($table->data)][1] = 'overrided_field';
|
||||
$table->cellclass[count($table->data)][2] = 'used_field';
|
||||
$table->cellclass[count($table->data)][3] = 'empty_field';
|
||||
|
@ -578,8 +629,8 @@ if ($template['recovery_notify'] == 0) {
|
|||
$table->cellclass[count($table->data)][2] = 'empty_field';
|
||||
$table->cellclass[count($table->data)][3] = 'empty_field';
|
||||
|
||||
// All fields but field1 will have [RECOVER] prefix if no recovery fields are configured
|
||||
$data[4] = $fieldn == 1 ? $data[1] : '[RECOVER]'.$data[1];
|
||||
// All fields but field1 will have [RECOVER] prefix if no recovery fields are configured.
|
||||
$data[4] = ((int) $fieldn === 1) ? $data[1] : '[RECOVER]'.$data[1];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -588,7 +639,7 @@ if ($template['recovery_notify'] == 0) {
|
|||
|
||||
$table->rowclass[] = 'firing_action firing_action_'.$kaction;
|
||||
|
||||
if ($command_preview != 'Internal type') {
|
||||
if ($command_preview !== 'Internal type') {
|
||||
$command_preview = str_replace('_'.$field.'_', $data[4], $command_preview);
|
||||
}
|
||||
|
||||
|
@ -598,16 +649,85 @@ if ($template['recovery_notify'] == 0) {
|
|||
|
||||
html_print_table($table);
|
||||
unset($table);
|
||||
ui_print_info_message(['title' => __('Command preview'), 'message' => $command_preview, 'no_close' => true]);
|
||||
ui_print_info_message(
|
||||
[
|
||||
'title' => __('Command preview'),
|
||||
'message' => $command_preview,
|
||||
'no_close' => true,
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
echo '</div>';
|
||||
// Recovering table
|
||||
|
||||
ui_require_css_file('main.min', 'include/javascript/fullcalendar/');
|
||||
ui_require_javascript_file('main.min', 'include/javascript/fullcalendar/');
|
||||
ui_require_javascript_file('pandora_fullcalendar');
|
||||
?>
|
||||
|
||||
<script language="javascript" type="text/javascript">
|
||||
$(document).ready (function () {
|
||||
|
||||
var calendarEl = document.getElementById('calendar_map');
|
||||
if(calendarEl){
|
||||
var eventsBBDD = $("#hidden-schedule").val();
|
||||
if(eventsBBDD === '' || eventsBBDD === 'Array') {
|
||||
eventsBBDD = '';
|
||||
}
|
||||
var events = loadEventBBDD(eventsBBDD);
|
||||
|
||||
var options = {
|
||||
contentHeight: "auto",
|
||||
headerToolbar: {
|
||||
left: "",
|
||||
center: "",
|
||||
right: ''
|
||||
},
|
||||
buttonText: {},
|
||||
dayHeaderFormat: { weekday: "short" },
|
||||
initialView: "dayGridWeek",
|
||||
navLinks: false,
|
||||
selectable: true,
|
||||
selectMirror: true,
|
||||
slotDuration: "01:00:00",
|
||||
slotLabelInterval: "02:00:00",
|
||||
snapDuration: "01:00:00",
|
||||
slotMinTime: "00:00:00",
|
||||
slotMaxTime: "24:00:00",
|
||||
scrollTime: "01:00:00",
|
||||
locale: "en-GB",
|
||||
firstDay: 1,
|
||||
eventTimeFormat: {
|
||||
hour: "numeric",
|
||||
minute: "2-digit",
|
||||
hour12: false
|
||||
},
|
||||
eventColor: "#82b92e",
|
||||
editable: false,
|
||||
dayMaxEvents: 3,
|
||||
dayPopoverFormat: { weekday: "long" },
|
||||
defaultAllDay: false,
|
||||
displayEventTime: true,
|
||||
displayEventEnd: true,
|
||||
selectOverlap: false,
|
||||
eventOverlap: false,
|
||||
allDaySlot: true,
|
||||
droppable: false,
|
||||
select: false,
|
||||
selectAllow: false,
|
||||
eventAllow: false,
|
||||
eventDrop: false,
|
||||
eventDragStop: false,
|
||||
eventResize: false,
|
||||
eventMouseEnter: false,
|
||||
eventMouseLeave: false,
|
||||
eventClick: false,
|
||||
};
|
||||
|
||||
var settings = {}
|
||||
|
||||
var calendar = fullCalendarPandora(calendarEl, options, settings, events);
|
||||
calendar.render();
|
||||
}
|
||||
});
|
||||
|
||||
$('#firing_action_select').change(function() {
|
||||
|
@ -619,8 +739,7 @@ $('#firing_action_select').change(function() {
|
|||
else {
|
||||
$('.action_details').show();
|
||||
}
|
||||
|
||||
|
||||
|
||||
$('.firing_action').hide();
|
||||
if($(this).val() != -1) {
|
||||
$('.firing_action_' + $(this).val()).show();
|
||||
|
|
|
@ -1,16 +1,31 @@
|
|||
<?php
|
||||
/**
|
||||
* Alerts templates.
|
||||
*
|
||||
* @category Alerts
|
||||
* @package Pandora FMS
|
||||
* @subpackage Community
|
||||
* @version 1.0.0
|
||||
* @license See below
|
||||
*
|
||||
* ______ ___ _______ _______ ________
|
||||
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
|
||||
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
|
||||
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
|
||||
*
|
||||
* ============================================================================
|
||||
* Copyright (c) 2005-2022 Artica Soluciones Tecnologicas
|
||||
* Please see http://pandorafms.org for full contribution list
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation for version 2.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
* ============================================================================
|
||||
*/
|
||||
|
||||
// Pandora FMS - http://pandorafms.com
|
||||
// ==================================================
|
||||
// Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
|
||||
// Please see http://pandorafms.org for full contribution list
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation for version 2.
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
// Load global vars.
|
||||
global $config;
|
||||
|
||||
|
@ -22,7 +37,9 @@ enterprise_include_once('meta/include/functions_alerts_meta.php');
|
|||
|
||||
check_login();
|
||||
|
||||
enterprise_hook('open_meta_frame');
|
||||
if (is_metaconsole() === true) {
|
||||
enterprise_hook('open_meta_frame');
|
||||
}
|
||||
|
||||
if (! check_acl($config['id_user'], 0, 'LM')) {
|
||||
db_pandora_audit(
|
||||
|
@ -33,24 +50,70 @@ if (! check_acl($config['id_user'], 0, 'LM')) {
|
|||
exit;
|
||||
}
|
||||
|
||||
|
||||
$duplicate_template = (bool) get_parameter('duplicate_template');
|
||||
$id = (int) get_parameter('id');
|
||||
$pure = get_parameter('pure', 0);
|
||||
$step = (int) get_parameter('step', 1);
|
||||
|
||||
// We set here the number of steps.
|
||||
if (defined('LAST_STEP') === false) {
|
||||
define('LAST_STEP', 3);
|
||||
}
|
||||
|
||||
if ($duplicate_template) {
|
||||
// Default events calendar.
|
||||
$default_events_calendar = [
|
||||
'monday' => [
|
||||
[
|
||||
'start' => '00:00:00',
|
||||
'end' => '00:00:00',
|
||||
],
|
||||
],
|
||||
'tuesday' => [
|
||||
[
|
||||
'start' => '00:00:00',
|
||||
'end' => '00:00:00',
|
||||
],
|
||||
],
|
||||
'wednesday' => [
|
||||
[
|
||||
'start' => '00:00:00',
|
||||
'end' => '00:00:00',
|
||||
],
|
||||
],
|
||||
'thursday' => [
|
||||
[
|
||||
'start' => '00:00:00',
|
||||
'end' => '00:00:00',
|
||||
],
|
||||
],
|
||||
'friday' => [
|
||||
[
|
||||
'start' => '00:00:00',
|
||||
'end' => '00:00:00',
|
||||
],
|
||||
],
|
||||
'saturday' => [
|
||||
[
|
||||
'start' => '00:00:00',
|
||||
'end' => '00:00:00',
|
||||
],
|
||||
],
|
||||
'sunday' => [
|
||||
[
|
||||
'start' => '00:00:00',
|
||||
'end' => '00:00:00',
|
||||
],
|
||||
],
|
||||
];
|
||||
|
||||
if ($duplicate_template === true) {
|
||||
$source_id = (int) get_parameter('source_id');
|
||||
$a_template = alerts_get_alert_template($source_id);
|
||||
} else {
|
||||
$a_template = alerts_get_alert_template($id);
|
||||
}
|
||||
|
||||
if (defined('METACONSOLE')) {
|
||||
if (is_metaconsole() === true) {
|
||||
$sec = 'advanced';
|
||||
} else {
|
||||
$sec = 'galertas';
|
||||
|
@ -62,9 +125,9 @@ if (check_acl_restricted_all($config['id_user'], 0, 'LM')) {
|
|||
}
|
||||
|
||||
if ($a_template !== false) {
|
||||
// If user tries to duplicate/edit a template with group=ALL
|
||||
// If user tries to duplicate/edit a template with group=ALL.
|
||||
if ($a_template['id_group'] == 0) {
|
||||
if (defined('METACONSOLE')) {
|
||||
if (is_metaconsole() === true) {
|
||||
alerts_meta_print_header();
|
||||
} else {
|
||||
if ($step == 1) {
|
||||
|
@ -84,7 +147,7 @@ if ($a_template !== false) {
|
|||
);
|
||||
}
|
||||
} else {
|
||||
// If user tries to duplicate/edit a template of others groups
|
||||
// If user tries to duplicate/edit a template of others groups.
|
||||
$own_info = get_user_info($config['id_user']);
|
||||
if ($own_info['is_admin'] || check_acl($config['id_user'], 0, 'PM')) {
|
||||
$own_groups = array_keys(users_get_groups($config['id_user'], 'LM'));
|
||||
|
@ -93,10 +156,10 @@ if ($a_template !== false) {
|
|||
}
|
||||
|
||||
$is_in_group = in_array($a_template['id_group'], $own_groups);
|
||||
// Then template group have to be in his own groups
|
||||
// Then template group have to be in his own groups.
|
||||
if ($is_in_group) {
|
||||
// Header
|
||||
if (defined('METACONSOLE')) {
|
||||
// Header.
|
||||
if (is_metaconsole() === true) {
|
||||
alerts_meta_print_header();
|
||||
} else {
|
||||
ui_print_page_header(
|
||||
|
@ -117,10 +180,10 @@ if ($a_template !== false) {
|
|||
}
|
||||
}
|
||||
|
||||
// This prevents to duplicate the header in case duplicate/edit_template action is performed
|
||||
// This prevents to duplicate the header in case duplicate/edit_template action is performed.
|
||||
} else {
|
||||
// Header
|
||||
if (defined('METACONSOLE')) {
|
||||
// Header.
|
||||
if (is_metaconsole() === true) {
|
||||
alerts_meta_print_header();
|
||||
} else {
|
||||
if ($step == 1) {
|
||||
|
@ -145,8 +208,10 @@ if ($a_template !== false) {
|
|||
if ($duplicate_template) {
|
||||
$source_id = (int) get_parameter('source_id');
|
||||
|
||||
// If user doesn't have the permission to access All group and source template is All group, then group is changed to the first group of user.
|
||||
if ($can_edit_all == false && a_template['id_group'] == 0) {
|
||||
// If user doesn't have the permission to access
|
||||
// All group and source template is All group,
|
||||
// then group is changed to the first group of user.
|
||||
if ($can_edit_all == false && $a_template['id_group'] == 0) {
|
||||
$a_template['id_group'] = users_get_first_group(false, 'LM', false);
|
||||
}
|
||||
|
||||
|
@ -166,11 +231,19 @@ if ($duplicate_template) {
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Build navbar steps.
|
||||
*
|
||||
* @param integer $step Step.
|
||||
* @param integer $id Id template.
|
||||
*
|
||||
* @return void Html output.
|
||||
*/
|
||||
function print_alert_template_steps($step, $id)
|
||||
{
|
||||
echo '<ol class="steps">';
|
||||
|
||||
if (defined('METACONSOLE')) {
|
||||
if (is_metaconsole() === true) {
|
||||
$sec = 'advanced';
|
||||
} else {
|
||||
$sec = 'galertas';
|
||||
|
@ -178,7 +251,7 @@ function print_alert_template_steps($step, $id)
|
|||
|
||||
$pure = get_parameter('pure', 0);
|
||||
|
||||
// Step 1
|
||||
// Step 1.
|
||||
if ($step == 1) {
|
||||
echo '<li class="first current">';
|
||||
} else if ($step > 1) {
|
||||
|
@ -199,7 +272,7 @@ function print_alert_template_steps($step, $id)
|
|||
|
||||
echo '</li>';
|
||||
|
||||
// Step 2
|
||||
// Step 2.
|
||||
if ($step == 2) {
|
||||
echo '<li class="current">';
|
||||
} else if ($step > 2) {
|
||||
|
@ -220,7 +293,7 @@ function print_alert_template_steps($step, $id)
|
|||
|
||||
echo '</li>';
|
||||
|
||||
// Step 3
|
||||
// Step 3.
|
||||
if ($step == 3) {
|
||||
echo '<li class="last current">';
|
||||
} else if ($step > 3) {
|
||||
|
@ -244,17 +317,24 @@ function print_alert_template_steps($step, $id)
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Update template
|
||||
*
|
||||
* @param integer $step Step.
|
||||
*
|
||||
* @return boolean result to update.
|
||||
*/
|
||||
function update_template($step)
|
||||
{
|
||||
global $config;
|
||||
|
||||
$id = (int) get_parameter('id');
|
||||
|
||||
if (empty($id)) {
|
||||
if (empty($id) === true) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (defined('METACONSOLE')) {
|
||||
if (is_metaconsole() === true) {
|
||||
$sec = 'advanced';
|
||||
} else {
|
||||
$sec = 'galertas';
|
||||
|
@ -267,7 +347,7 @@ function update_template($step)
|
|||
$priority = (int) get_parameter('priority');
|
||||
$id_group = get_parameter('id_group');
|
||||
// Only for Metaconsole. Save the previous name for synchronizing.
|
||||
if (is_metaconsole()) {
|
||||
if (is_metaconsole() === true) {
|
||||
$previous_name = db_get_value('name', 'talert_templates', 'id', $id);
|
||||
} else {
|
||||
$previous_name = '';
|
||||
|
@ -284,18 +364,8 @@ function update_template($step)
|
|||
|
||||
$result = alerts_update_alert_template($id, $values);
|
||||
} else if ($step == 2) {
|
||||
$monday = (bool) get_parameter('monday');
|
||||
$tuesday = (bool) get_parameter('tuesday');
|
||||
$wednesday = (bool) get_parameter('wednesday');
|
||||
$thursday = (bool) get_parameter('thursday');
|
||||
$friday = (bool) get_parameter('friday');
|
||||
$saturday = (bool) get_parameter('saturday');
|
||||
$sunday = (bool) get_parameter('sunday');
|
||||
$schedule = get_parameter('schedule');
|
||||
$special_day = (int) get_parameter('special_day');
|
||||
$time_from = (string) get_parameter('time_from');
|
||||
$time_from = date('H:i:00', strtotime($time_from));
|
||||
$time_to = (string) get_parameter('time_to');
|
||||
$time_to = date('H:i:00', strtotime($time_to));
|
||||
$threshold = (int) get_parameter('threshold');
|
||||
$max_alerts = (int) get_parameter('max_alerts');
|
||||
$min_alerts = (int) get_parameter('min_alerts');
|
||||
|
@ -308,18 +378,17 @@ function update_template($step)
|
|||
$matches = (bool) get_parameter('matches_value');
|
||||
|
||||
$default_action = (int) get_parameter('default_action');
|
||||
if (empty($default_action)) {
|
||||
if (empty($default_action) === true) {
|
||||
$default_action = null;
|
||||
}
|
||||
|
||||
$values = [
|
||||
'monday' => $monday,
|
||||
'tuesday' => $tuesday,
|
||||
'wednesday' => $wednesday,
|
||||
'thursday' => $thursday,
|
||||
'friday' => $friday,
|
||||
'saturday' => $saturday,
|
||||
'sunday' => $sunday,
|
||||
'schedule' => json_encode(
|
||||
json_decode(
|
||||
io_safe_output($schedule),
|
||||
true
|
||||
)
|
||||
),
|
||||
'special_day' => $special_day,
|
||||
'time_threshold' => $threshold,
|
||||
'id_alert_action' => $default_action,
|
||||
|
@ -334,26 +403,12 @@ function update_template($step)
|
|||
'disable_event' => $disable_event,
|
||||
];
|
||||
|
||||
// Different datetimes format for oracle
|
||||
switch ($config['dbtype']) {
|
||||
case 'mysql':
|
||||
case 'postgresql':
|
||||
$values['time_from'] = $time_from;
|
||||
$values['time_to'] = $time_to;
|
||||
break;
|
||||
|
||||
case 'oracle':
|
||||
$values['time_from'] = "#to_date('".$time_from."','hh24:mi:ss')";
|
||||
$values['time_to'] = "#to_date('".$time_to."','hh24:mi:ss')";
|
||||
break;
|
||||
}
|
||||
|
||||
$result = alerts_update_alert_template($id, $values);
|
||||
} else if ($step == 3) {
|
||||
$recovery_notify = (bool) get_parameter('recovery_notify');
|
||||
for ($i = 1; $i <= $config['max_macro_fields']; $i++) {
|
||||
$values['field'.$i] = (string) get_parameter('field'.$i);
|
||||
$values['field'.$i.'_recovery'] = $recovery_notify ? (string) get_parameter('field'.$i.'_recovery') : '';
|
||||
$values['field'.$i.'_recovery'] = ($recovery_notify) ? (string) get_parameter('field'.$i.'_recovery') : '';
|
||||
}
|
||||
|
||||
$values['recovery_notify'] = $recovery_notify;
|
||||
|
@ -364,9 +419,21 @@ function update_template($step)
|
|||
}
|
||||
|
||||
if ($result) {
|
||||
db_pandora_audit('Template alert management', 'Update alert template #'.$id, false, false, json_encode($values));
|
||||
db_pandora_audit(
|
||||
'Template alert management',
|
||||
'Update alert template #'.$id,
|
||||
false,
|
||||
false,
|
||||
json_encode($values)
|
||||
);
|
||||
} else {
|
||||
db_pandora_audit('Template alert management', 'Fail try to update alert template #'.$id, false, false, json_encode($values));
|
||||
db_pandora_audit(
|
||||
'Template alert management',
|
||||
'Fail try to update alert template #'.$id,
|
||||
false,
|
||||
false,
|
||||
json_encode($values)
|
||||
);
|
||||
}
|
||||
|
||||
return $result;
|
||||
|
@ -412,15 +479,10 @@ $type = '';
|
|||
$value = '';
|
||||
$max = '';
|
||||
$min = '';
|
||||
$time_from = '12:00:00';
|
||||
$time_to = '12:00:00';
|
||||
$monday = true;
|
||||
$tuesday = true;
|
||||
$wednesday = true;
|
||||
$thursday = true;
|
||||
$friday = true;
|
||||
$saturday = true;
|
||||
$sunday = true;
|
||||
|
||||
$schedule = json_encode(
|
||||
$default_events_calendar
|
||||
);
|
||||
$special_day = 0;
|
||||
$default_action = 0;
|
||||
$fields = [];
|
||||
|
@ -455,17 +517,7 @@ if ($create_template) {
|
|||
$priority = (int) get_parameter('priority');
|
||||
$wizard_level = (string) get_parameter('wizard_level');
|
||||
$id_group = get_parameter('id_group');
|
||||
switch ($config['dbtype']) {
|
||||
case 'mysql':
|
||||
case 'postgresql':
|
||||
$name_check = db_get_value('name', 'talert_templates', 'name', $name);
|
||||
break;
|
||||
|
||||
case 'oracle':
|
||||
$name_check = db_get_value('name', 'talert_templates', 'to_char(name)', $name);
|
||||
break;
|
||||
}
|
||||
|
||||
$name_check = db_get_value('name', 'talert_templates', 'name', $name);
|
||||
|
||||
$values = [
|
||||
'description' => $description,
|
||||
|
@ -476,6 +528,7 @@ if ($create_template) {
|
|||
'matches_value' => $matches,
|
||||
'priority' => $priority,
|
||||
'wizard_level' => $wizard_level,
|
||||
'schedule' => $schedule,
|
||||
];
|
||||
|
||||
if ($config['dbtype'] == 'oracle') {
|
||||
|
@ -507,8 +560,7 @@ if ($create_template) {
|
|||
);
|
||||
}
|
||||
|
||||
|
||||
// Show errors
|
||||
// Show errors.
|
||||
if (!isset($messageAction)) {
|
||||
$messageAction = __('Could not be created');
|
||||
}
|
||||
|
@ -524,9 +576,9 @@ if ($create_template) {
|
|||
);
|
||||
|
||||
|
||||
// Go to previous step in case of error
|
||||
// Go to previous step in case of error.
|
||||
if ($result === false) {
|
||||
$step = ($step - 1);
|
||||
$step--;
|
||||
} else {
|
||||
$id = $result;
|
||||
}
|
||||
|
@ -540,9 +592,9 @@ if ($update_template) {
|
|||
__('Successfully updated'),
|
||||
__('Could not be updated')
|
||||
);
|
||||
// Go to previous step in case of error
|
||||
// Go to previous step in case of error.
|
||||
if ($result === false) {
|
||||
$step = ($step - 1);
|
||||
$step--;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -555,15 +607,8 @@ if ($id && ! $create_template) {
|
|||
$max = $template['max_value'];
|
||||
$min = $template['min_value'];
|
||||
$matches = $template['matches_value'];
|
||||
$time_from = $template['time_from'];
|
||||
$time_to = $template['time_to'];
|
||||
$monday = (bool) $template['monday'];
|
||||
$tuesday = (bool) $template['tuesday'];
|
||||
$wednesday = (bool) $template['wednesday'];
|
||||
$thursday = (bool) $template['thursday'];
|
||||
$friday = (bool) $template['friday'];
|
||||
$saturday = (bool) $template['saturday'];
|
||||
$sunday = (bool) $template['sunday'];
|
||||
|
||||
$schedule = $template['schedule'];
|
||||
$special_day = (int) $template['special_day'];
|
||||
$max_alerts = $template['max_alerts'];
|
||||
$min_alerts = $template['min_alerts'];
|
||||
|
@ -594,7 +639,7 @@ $table = new stdClass();
|
|||
$table->id = 'template';
|
||||
$table->width = '100%';
|
||||
$table->class = 'databox filters';
|
||||
if (defined('METACONSOLE')) {
|
||||
if (is_metaconsole() === true) {
|
||||
$table->head[0] = __('Create Template');
|
||||
$table->head_colspan[0] = 4;
|
||||
$table->headstyle[0] = 'text-align: center';
|
||||
|
@ -613,67 +658,7 @@ if ($step == 2) {
|
|||
$show_matches = false;
|
||||
}
|
||||
|
||||
// Firing conditions and events.
|
||||
$table->colspan = [];
|
||||
$table->data[0][0] = __('Days of week');
|
||||
$table->data[0][1] = __('Mon');
|
||||
$table->data[0][1] .= html_print_checkbox(
|
||||
'monday',
|
||||
1,
|
||||
$monday,
|
||||
true,
|
||||
(!$is_management_allowed | $disabled)
|
||||
);
|
||||
$table->data[0][1] .= __('Tue');
|
||||
$table->data[0][1] .= html_print_checkbox(
|
||||
'tuesday',
|
||||
1,
|
||||
$tuesday,
|
||||
true,
|
||||
(!$is_management_allowed | $disabled)
|
||||
);
|
||||
$table->data[0][1] .= __('Wed');
|
||||
$table->data[0][1] .= html_print_checkbox(
|
||||
'wednesday',
|
||||
1,
|
||||
$wednesday,
|
||||
true,
|
||||
(!$is_management_allowed | $disabled)
|
||||
);
|
||||
$table->data[0][1] .= __('Thu');
|
||||
$table->data[0][1] .= html_print_checkbox(
|
||||
'thursday',
|
||||
1,
|
||||
$thursday,
|
||||
true,
|
||||
(!$is_management_allowed | $disabled)
|
||||
);
|
||||
$table->data[0][1] .= __('Fri');
|
||||
$table->data[0][1] .= html_print_checkbox(
|
||||
'friday',
|
||||
1,
|
||||
$friday,
|
||||
true,
|
||||
(!$is_management_allowed | $disabled)
|
||||
);
|
||||
$table->data[0][1] .= __('Sat');
|
||||
$table->data[0][1] .= html_print_checkbox(
|
||||
'saturday',
|
||||
1,
|
||||
$saturday,
|
||||
true,
|
||||
(!$is_management_allowed | $disabled)
|
||||
);
|
||||
$table->data[0][1] .= __('Sun');
|
||||
$table->data[0][1] .= html_print_checkbox(
|
||||
'sunday',
|
||||
1,
|
||||
$sunday,
|
||||
true,
|
||||
(!$is_management_allowed | $disabled)
|
||||
);
|
||||
|
||||
$table->data[0][2] = __('Use special days list');
|
||||
$table->data[0][0] = __('Use special days list');
|
||||
$data_special_days = Calendar::calendars(
|
||||
// Fields.
|
||||
[ '`talert_calendar`.*' ],
|
||||
|
@ -693,7 +678,7 @@ if ($step == 2) {
|
|||
true
|
||||
);
|
||||
|
||||
$table->data[0][3] = html_print_select(
|
||||
$table->data[0][1] = html_print_select(
|
||||
$data_special_days,
|
||||
'special_day',
|
||||
$special_day,
|
||||
|
@ -707,46 +692,21 @@ if ($step == 2) {
|
|||
(!$is_management_allowed | $disabled)
|
||||
);
|
||||
|
||||
$table->data[1][0] = __('Time from');
|
||||
$table->data[1][1] = html_print_input_text(
|
||||
'time_from',
|
||||
$time_from,
|
||||
// Firing conditions and events.
|
||||
$table->colspan = [];
|
||||
$table->data[1][0] = __('Schedule');
|
||||
$table->colspan[1][1] = 3;
|
||||
$table->data[1][1] = ui_print_warning_message(
|
||||
[
|
||||
'message' => __('No alert has been scheduled yet'),
|
||||
'force_style' => 'display:none;',
|
||||
'force_class' => 'alert_schedule',
|
||||
],
|
||||
'',
|
||||
7,
|
||||
8,
|
||||
true,
|
||||
false,
|
||||
false,
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
false,
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
(!$is_management_allowed | $disabled)
|
||||
);
|
||||
$table->data[1][2] = __('Time to');
|
||||
$table->data[1][3] = html_print_input_text(
|
||||
'time_to',
|
||||
$time_to,
|
||||
'',
|
||||
7,
|
||||
8,
|
||||
true,
|
||||
false,
|
||||
false,
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
false,
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
(!$is_management_allowed | $disabled)
|
||||
true
|
||||
);
|
||||
$table->data[1][1] .= '<div id="calendar_map" style="width: 90%;"></div>';
|
||||
$table->data[1][1] .= html_print_input_hidden('schedule', $schedule, true);
|
||||
|
||||
$table->colspan['threshold'][1] = 3;
|
||||
$table->data['threshold'][0] = __('Time threshold');
|
||||
|
@ -764,8 +724,8 @@ if ($step == 2) {
|
|||
(!$is_management_allowed | $disabled)
|
||||
);
|
||||
|
||||
$table->data[3][0] = __('Min. number of alerts');
|
||||
$table->data[3][1] = html_print_input_text(
|
||||
$table->data[4][0] = __('Min. number of alerts');
|
||||
$table->data[4][1] = html_print_input_text(
|
||||
'min_alerts',
|
||||
$min_alerts,
|
||||
'',
|
||||
|
@ -785,12 +745,12 @@ if ($step == 2) {
|
|||
(!$is_management_allowed | $disabled)
|
||||
);
|
||||
|
||||
$table->data[3][2] = __('Reset counter for non-sustained alerts');
|
||||
$table->data[3][2] .= ui_print_help_tip(
|
||||
$table->data[4][2] = __('Reset counter for non-sustained alerts');
|
||||
$table->data[4][2] .= ui_print_help_tip(
|
||||
__('Enable this option if you want the counter to be reset when the alert is not being fired consecutively, even if it\'s within the time threshold'),
|
||||
true
|
||||
);
|
||||
$table->data[3][3] = html_print_checkbox(
|
||||
$table->data[4][3] = html_print_checkbox(
|
||||
'min_alerts_reset_counter',
|
||||
1,
|
||||
$min_alerts_reset_counter,
|
||||
|
@ -798,11 +758,11 @@ if ($step == 2) {
|
|||
(!$is_management_allowed | $disabled),
|
||||
'',
|
||||
false,
|
||||
$create_template == 1 ? 'checked=checked' : ''
|
||||
($create_template == 1) ? 'checked=checked' : ''
|
||||
);
|
||||
|
||||
$table->data[4][0] = __('Max. number of alerts');
|
||||
$table->data[4][1] = html_print_input_text(
|
||||
$table->data[5][0] = __('Max. number of alerts');
|
||||
$table->data[5][1] = html_print_input_text(
|
||||
'max_alerts',
|
||||
$max_alerts,
|
||||
'',
|
||||
|
@ -822,8 +782,8 @@ if ($step == 2) {
|
|||
(!$is_management_allowed | $disabled)
|
||||
);
|
||||
|
||||
$table->data[4][2] = __('Disable event');
|
||||
$table->data[4][3] = html_print_checkbox(
|
||||
$table->data[5][2] = __('Disable event');
|
||||
$table->data[5][3] = html_print_checkbox(
|
||||
'disable_event',
|
||||
1,
|
||||
$disable_event,
|
||||
|
@ -831,22 +791,21 @@ if ($step == 2) {
|
|||
(!$is_management_allowed | $disabled)
|
||||
);
|
||||
|
||||
$table->data[5][0] = __('Default action');
|
||||
$table->data[6][0] = __('Default action');
|
||||
$usr_groups = implode(
|
||||
',',
|
||||
array_keys(users_get_groups($config['id_user'], 'LM', true))
|
||||
);
|
||||
|
||||
$sql_query = sprintf(
|
||||
'
|
||||
SELECT id, name
|
||||
'SELECT id, name
|
||||
FROM talert_actions
|
||||
WHERE id_group IN (%s)
|
||||
ORDER BY name',
|
||||
$usr_groups
|
||||
);
|
||||
|
||||
$table->data[5][1] = html_print_select_from_sql(
|
||||
$table->data[6][1] = html_print_select_from_sql(
|
||||
$sql_query,
|
||||
'default_action',
|
||||
$default_action,
|
||||
|
@ -861,13 +820,13 @@ if ($step == 2) {
|
|||
false,
|
||||
0
|
||||
);
|
||||
$table->data[5][1] .= ui_print_help_tip(
|
||||
$table->data[6][1] .= ui_print_help_tip(
|
||||
__('Unless they\'re left blank, the fields from the action will override those set on the template.'),
|
||||
true
|
||||
);
|
||||
|
||||
$table->data[6][0] = __('Condition type');
|
||||
$table->data[6][1] = html_print_select(
|
||||
$table->data[7][0] = __('Condition type');
|
||||
$table->data[7][1] = html_print_select(
|
||||
alerts_get_alert_templates_types(),
|
||||
'type',
|
||||
$type,
|
||||
|
@ -880,15 +839,15 @@ if ($step == 2) {
|
|||
'',
|
||||
(!$is_management_allowed | $disabled)
|
||||
);
|
||||
$table->data[6][1] .= '<span id="matches_value" '.($show_matches ? '' : 'class="invisible"').'>';
|
||||
$table->data[6][1] .= ' '.html_print_checkbox('matches_value', 1, $matches, true);
|
||||
$table->data[6][1] .= html_print_label(
|
||||
$table->data[7][1] .= '<span id="matches_value" '.(($show_matches) ? '' : 'class="invisible"').'>';
|
||||
$table->data[7][1] .= ' '.html_print_checkbox('matches_value', 1, $matches, true);
|
||||
$table->data[7][1] .= html_print_label(
|
||||
__('Trigger when matches the value'),
|
||||
'checkbox-matches_value',
|
||||
true
|
||||
);
|
||||
$table->data[6][1] .= '</span>';
|
||||
$table->colspan[6][1] = 3;
|
||||
$table->data[7][1] .= '</span>';
|
||||
$table->colspan[7][1] = 3;
|
||||
|
||||
$table->data['value'][0] = __('Value');
|
||||
$table->data['value'][1] = html_print_input_text(
|
||||
|
@ -1120,6 +1079,10 @@ if ($step == 2) {
|
|||
case 'onchange':
|
||||
$show_matches = true;
|
||||
break;
|
||||
|
||||
default:
|
||||
// Not possible.
|
||||
break;
|
||||
}
|
||||
|
||||
$table->data[0][0] = __('Name');
|
||||
|
@ -1203,7 +1166,7 @@ if ($step == 2) {
|
|||
(!$is_management_allowed | $disabled)
|
||||
);
|
||||
|
||||
if (defined('METACONSOLE')) {
|
||||
if (is_metaconsole() === true) {
|
||||
$table->data[3][0] = __('Wizard level');
|
||||
$wizard_levels = [
|
||||
'nowizard' => __('No wizard'),
|
||||
|
@ -1220,7 +1183,7 @@ if ($step == 2) {
|
|||
echo ui_get_using_system_timezone_warning();
|
||||
}
|
||||
|
||||
// If it's the last step it will redirect to template lists
|
||||
// If it's the last step it will redirect to template lists.
|
||||
if ($step >= LAST_STEP) {
|
||||
echo '<form method="post" action="index.php?sec='.$sec.'&sec2=godmode/alerts/alert_templates&pure='.$pure.'">';
|
||||
} else {
|
||||
|
@ -1249,7 +1212,7 @@ if (!$disabled) {
|
|||
} else {
|
||||
html_print_input_hidden('step', ($step + 1));
|
||||
if ($step == 2) {
|
||||
// Javascript onsubmit to avoid min = 0 and max = 0
|
||||
// Javascript onsubmit to avoid min = 0 and max = 0.
|
||||
html_print_submit_button(
|
||||
__('Next'),
|
||||
'next',
|
||||
|
@ -1271,12 +1234,17 @@ if (!$disabled) {
|
|||
echo '</div>';
|
||||
echo '</form>';
|
||||
|
||||
enterprise_hook('close_meta_frame');
|
||||
if (is_metaconsole() === true) {
|
||||
enterprise_hook('close_meta_frame');
|
||||
}
|
||||
|
||||
ui_require_javascript_file('pandora_alerts');
|
||||
ui_include_time_picker();
|
||||
ui_require_jquery_file('ui.datepicker-'.get_user_language(), 'include/javascript/i18n/');
|
||||
ui_require_javascript_file('tiny_mce', 'include/javascript/tiny_mce/');
|
||||
ui_require_css_file('main.min', 'include/javascript/fullcalendar/');
|
||||
ui_require_javascript_file('main.min', 'include/javascript/fullcalendar/');
|
||||
ui_require_javascript_file('pandora_fullcalendar');
|
||||
?>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
@ -1299,18 +1267,18 @@ var not_normal = <?php echo "'".__('The alert would fire when the module is in n
|
|||
|
||||
function check_fields_step2() {
|
||||
var correct = true;
|
||||
|
||||
|
||||
type = $("select[name='type']").val();
|
||||
min_v = $("input[name='min']").val();
|
||||
max_v = $("input[name='max']").val();
|
||||
|
||||
|
||||
if (type == 'max_min') {
|
||||
if ((min_v == 0) && (max_v == 0)) {
|
||||
alert(error_message_min_max_zero);
|
||||
correct = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return correct;
|
||||
}
|
||||
|
||||
|
@ -1385,7 +1353,7 @@ if ($step == 2) {
|
|||
$("input#text-value").keyup (render_example);
|
||||
$("input#text-max").keyup (render_example);
|
||||
$("input#text-min").keyup (render_example);
|
||||
|
||||
|
||||
$("#type").change (function () {
|
||||
switch (this.value) {
|
||||
case "equal":
|
||||
|
@ -1393,76 +1361,74 @@ if ($step == 2) {
|
|||
$("img#regex_good, img#regex_bad, span#matches_value").hide ();
|
||||
$("#template-max, #template-min").hide ();
|
||||
$("#template-value, #template-example").show ();
|
||||
|
||||
|
||||
/* Show example */
|
||||
if (this.value == "equal")
|
||||
$("span#example").empty ().append (is);
|
||||
else
|
||||
$("span#example").empty ().append (is_not);
|
||||
|
||||
break;
|
||||
case "regex":
|
||||
$("#template-max, #template-min").hide ();
|
||||
$("#template-value, #template-example, span#matches_value").show ();
|
||||
check_regex ();
|
||||
|
||||
|
||||
/* Show example */
|
||||
if ($("#checkbox-matches_value")[0].checked)
|
||||
$("span#example").empty ().append (matches);
|
||||
else
|
||||
$("span#example").empty ().append (matches_not);
|
||||
|
||||
break;
|
||||
case "max_min":
|
||||
$("#template-value").hide ();
|
||||
$("#template-max, #template-min, #template-example, span#matches_value").show ();
|
||||
|
||||
|
||||
/* Show example */
|
||||
if ($("#checkbox-matches_value")[0].checked)
|
||||
$("span#example").empty ().append (between);
|
||||
else
|
||||
$("span#example").empty ().append (between_not);
|
||||
|
||||
|
||||
break;
|
||||
case "max":
|
||||
$("#template-value, #template-min, span#matches_value").hide ();
|
||||
$("#template-max, #template-example").show ();
|
||||
|
||||
|
||||
/* Show example */
|
||||
$("span#example").empty ().append (over);
|
||||
break;
|
||||
case "min":
|
||||
$("#template-value, #template-max, span#matches_value").hide ();
|
||||
$("#template-min, #template-example").show ();
|
||||
|
||||
|
||||
/* Show example */
|
||||
$("span#example").empty ().append (under);
|
||||
break;
|
||||
case "warning":
|
||||
$("#template-value, #template-max, span#matches_value, #template-min").hide ();
|
||||
$("#template-example").show ();
|
||||
|
||||
|
||||
/* Show example */
|
||||
$("span#example").empty ().append (warning);
|
||||
break;
|
||||
case "critical":
|
||||
$("#template-value, #template-max, span#matches_value, #template-min").hide ();
|
||||
$("#template-example").show ();
|
||||
|
||||
|
||||
/* Show example */
|
||||
$("span#example").empty ().append (critical);
|
||||
break;
|
||||
case "not_normal":
|
||||
$("#template-value, #template-max, span#matches_value, #template-min").hide ();
|
||||
$("#template-example").show ();
|
||||
|
||||
|
||||
/* Show example */
|
||||
$("span#example").empty ().append (not_normal);
|
||||
break;
|
||||
case "onchange":
|
||||
$("#template-value, #template-max, #template-min").hide ();
|
||||
$("#template-example, span#matches_value").show ();
|
||||
|
||||
|
||||
/* Show example */
|
||||
if ($("#checkbox-matches_value")[0].checked)
|
||||
$("span#example").empty ().append (onchange_msg);
|
||||
|
@ -1484,10 +1450,10 @@ if ($step == 2) {
|
|||
$("#template-value, #template-max, #template-min, #template-example, span#matches_value").hide ();
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
render_example ();
|
||||
}).change ();
|
||||
|
||||
|
||||
$("#checkbox-matches_value").click (function () {
|
||||
enabled = this.checked;
|
||||
type = $("#type").val();
|
||||
|
@ -1514,12 +1480,12 @@ if ($step == 2) {
|
|||
else {
|
||||
$("span#example").empty ().append (onchange_not);
|
||||
}
|
||||
}
|
||||
}
|
||||
render_example ();
|
||||
});
|
||||
|
||||
|
||||
$("#text-value").keyup (check_regex);
|
||||
|
||||
|
||||
$('#text-time_from, #text-time_to').timepicker({
|
||||
showSecond: true,
|
||||
timeFormat: '<?php echo TIME_FORMAT_JS; ?>',
|
||||
|
@ -1529,8 +1495,9 @@ if ($step == 2) {
|
|||
minuteText: '<?php echo __('Minute'); ?>',
|
||||
secondText: '<?php echo __('Second'); ?>',
|
||||
currentText: '<?php echo __('Now'); ?>',
|
||||
closeText: '<?php echo __('Close'); ?>'});
|
||||
|
||||
closeText: '<?php echo __('Close'); ?>'}
|
||||
);
|
||||
|
||||
$("#threshold").change (function () {
|
||||
if (this.value == -1) {
|
||||
$("#text-other_threshold").val("");
|
||||
|
@ -1542,6 +1509,87 @@ if ($step == 2) {
|
|||
$("#template-threshold-other_input").hide ();
|
||||
}
|
||||
});
|
||||
|
||||
var is_management_allowed = parseInt('<?php echo (int) $is_management_allowed; ?>');
|
||||
|
||||
var eventsBBDD = $("#hidden-schedule").val();
|
||||
if(eventsBBDD === '') {
|
||||
eventsBBDD = '<?php echo json_encode($default_events_calendar); ?>';
|
||||
}
|
||||
|
||||
var events = loadEventBBDD(eventsBBDD);
|
||||
var calendarEl = document.getElementById('calendar_map');
|
||||
|
||||
var options = {
|
||||
contentHeight: "auto",
|
||||
headerToolbar: {
|
||||
left: "",
|
||||
center: "",
|
||||
right: is_management_allowed === 0 ? '' : "timeGridWeek,dayGridWeek"
|
||||
},
|
||||
buttonText: {
|
||||
dayGridWeek: '<?php echo __('Simple'); ?>',
|
||||
timeGridWeek: '<?php echo __('Detailed'); ?>'
|
||||
},
|
||||
dayHeaderFormat: { weekday: "short" },
|
||||
initialView: "dayGridWeek",
|
||||
navLinks: false,
|
||||
selectable: true,
|
||||
selectMirror: true,
|
||||
slotDuration: "01:00:00",
|
||||
slotLabelInterval: "02:00:00",
|
||||
snapDuration: "01:00:00",
|
||||
slotMinTime: "00:00:00",
|
||||
slotMaxTime: "24:00:00",
|
||||
scrollTime: "01:00:00",
|
||||
locale: "en-GB",
|
||||
firstDay: 1,
|
||||
eventTimeFormat: {
|
||||
hour: "numeric",
|
||||
minute: "2-digit",
|
||||
hour12: false
|
||||
},
|
||||
eventColor: "#82b92e",
|
||||
editable: is_management_allowed === 0 ? false : true,
|
||||
dayMaxEvents: 3,
|
||||
dayPopoverFormat: { weekday: "long" },
|
||||
defaultAllDay: false,
|
||||
displayEventTime: true,
|
||||
displayEventEnd: true,
|
||||
selectOverlap: false,
|
||||
eventOverlap: false,
|
||||
allDaySlot: true,
|
||||
droppable: false,
|
||||
select: is_management_allowed === 0 ? false : select_alert_template,
|
||||
selectAllow: is_management_allowed === 0 ? false : selectAllow_alert_template,
|
||||
eventAllow: is_management_allowed === 0 ? false : eventAllow_alert_template,
|
||||
eventDrop: is_management_allowed === 0 ? false : eventDrop_alert_template,
|
||||
eventDragStop: is_management_allowed === 0 ? false : eventDragStop_alert_template,
|
||||
eventResize: is_management_allowed === 0 ? false : eventResize_alert_template,
|
||||
eventMouseEnter: is_management_allowed === 0 ? false : eventMouseEnter_alert_template,
|
||||
eventMouseLeave: is_management_allowed === 0 ? false : eventMouseLeave_alert_template,
|
||||
eventClick: is_management_allowed === 0 ? false : eventClick_alert_template,
|
||||
};
|
||||
|
||||
var settings = {
|
||||
timeFormat: '<?php echo TIME_FORMAT_JS; ?>',
|
||||
timeOnlyTitle: '<?php echo __('Choose time'); ?>',
|
||||
timeText: '<?php echo __('Time'); ?>',
|
||||
hourText: '<?php echo __('Hour'); ?>',
|
||||
minuteText: '<?php echo __('Minute'); ?>',
|
||||
secondText: '<?php echo __('Second'); ?>',
|
||||
currentText: '<?php echo __('Now'); ?>',
|
||||
closeText: '<?php echo __('Close'); ?>',
|
||||
url: '<?php echo ui_get_full_url('ajax.php', false, false, false); ?>',
|
||||
removeText: '<?php echo __('Remove'); ?>',
|
||||
userLanguage: '<?php echo get_user_language(); ?>',
|
||||
loadingText: '<?php echo __('Loading, this operation might take several minutes...'); ?>',
|
||||
tooltipText: '<?php echo __('Drag out to remove'); ?>',
|
||||
alert: '<?php echo __('Alert'); ?>'
|
||||
}
|
||||
|
||||
var calendar = fullCalendarPandora(calendarEl, options, settings, events);
|
||||
calendar.render();
|
||||
<?php
|
||||
} else if ($step == 3) {
|
||||
?>
|
||||
|
|
|
@ -25,6 +25,7 @@ $enable_alert = (bool) get_parameter('enable_alert');
|
|||
$get_actions_module = (bool) get_parameter('get_actions_module');
|
||||
$show_update_action_menu = (bool) get_parameter('show_update_action_menu');
|
||||
$get_agent_alerts_agent_view = (bool) get_parameter('get_agent_alerts_agent_view');
|
||||
$resize_event_week = (bool) get_parameter('resize_event_week');
|
||||
|
||||
if ($get_agent_alerts_simple) {
|
||||
$id_agent = (int) get_parameter('id_agent');
|
||||
|
@ -561,4 +562,51 @@ if ($show_update_action_menu) {
|
|||
return;
|
||||
}
|
||||
|
||||
if ($resize_event_week === true) {
|
||||
// Date.
|
||||
$day_from = get_parameter('day_from', 0);
|
||||
$day_to = get_parameter('day_to', 0);
|
||||
|
||||
// Time.
|
||||
$time_from = get_parameter('time_from', '');
|
||||
$time_to = get_parameter('time_to', '');
|
||||
|
||||
$table = new StdClass();
|
||||
$table->class = 'databox filters';
|
||||
$table->width = '100%';
|
||||
$table->data = [];
|
||||
|
||||
$table->data[0][0] = __('From:');
|
||||
$table->data[0][1] = html_print_input_hidden(
|
||||
'day_from',
|
||||
$day_from,
|
||||
true
|
||||
);
|
||||
$table->data[0][1] .= html_print_input_text(
|
||||
'time_from_event',
|
||||
$time_from,
|
||||
'',
|
||||
9,
|
||||
9,
|
||||
true
|
||||
);
|
||||
$table->data[1][0] = __('To:');
|
||||
$table->data[1][1] = html_print_input_hidden(
|
||||
'day_to',
|
||||
$day_from,
|
||||
true
|
||||
);
|
||||
$table->data[1][1] .= html_print_input_text(
|
||||
'time_to_event',
|
||||
($time_to === '00:00:00') ? '23:59:59' : $time_to,
|
||||
'',
|
||||
9,
|
||||
9,
|
||||
true
|
||||
);
|
||||
|
||||
echo html_print_table($table, true);
|
||||
return;
|
||||
}
|
||||
|
||||
return;
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
/**
|
||||
* Pandora build version and version
|
||||
*/
|
||||
$build_version = 'PC220207';
|
||||
$build_version = 'PC220208';
|
||||
$pandora_version = 'v7.0NG.759';
|
||||
|
||||
// Do not overwrite default timezone set if defined.
|
||||
|
|
|
@ -1059,39 +1059,6 @@ function alerts_get_alert_template_time_to($id_alert_template)
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get alert template in weekday format.
|
||||
*
|
||||
* @param int Id of an alert template.
|
||||
*
|
||||
* @return mixed Alert template in weekday format or false if something goes wrong.
|
||||
*/
|
||||
function alerts_get_alert_template_weekdays($id_alert_template)
|
||||
{
|
||||
$alert = alerts_get_alert_template($id_alert_template);
|
||||
|
||||
if ($alert === false) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$retval = [];
|
||||
$days = [
|
||||
'monday',
|
||||
'tuesday',
|
||||
'wednesday',
|
||||
'thursday',
|
||||
'friday',
|
||||
'saturday',
|
||||
'sunday',
|
||||
];
|
||||
foreach ($days as $day) {
|
||||
$retval[$day] = (bool) $alert[$day];
|
||||
}
|
||||
|
||||
return $retval;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get recovery_notify of talert_templates table.
|
||||
*
|
||||
|
@ -2574,9 +2541,14 @@ function alerts_normalize_actions_escalation($escalation)
|
|||
$any_greater_than = true;
|
||||
}
|
||||
|
||||
$n = count($escalation[$k]);
|
||||
if ($n > $max_elements) {
|
||||
$max_elements = $n;
|
||||
if (isset($escalation[$k]) === true
|
||||
&& empty($escalation[$k]) === false
|
||||
&& is_array($escalation[$k]) === true
|
||||
) {
|
||||
$n = count($escalation[$k]);
|
||||
if ($n > $max_elements) {
|
||||
$max_elements = $n;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1080,14 +1080,23 @@ function modules_get_agentmodule($id_agentmodule)
|
|||
}
|
||||
|
||||
|
||||
function modules_get_table_data($id_agent_module)
|
||||
/**
|
||||
* Gets data table for agent module
|
||||
*
|
||||
* @param integer|null $id_agent_module Id agentmodule.
|
||||
* @param integer|null $id_type Id module type.
|
||||
* @return void
|
||||
*/
|
||||
function modules_get_table_data(?int $id_agent_module, ?int $id_type)
|
||||
{
|
||||
$id_type = db_get_value(
|
||||
'id_tipo_modulo',
|
||||
'tagente_modulo',
|
||||
'id_agente_modulo',
|
||||
$id_agent_module
|
||||
);
|
||||
if ($id_type === null) {
|
||||
$id_type = db_get_value(
|
||||
'id_tipo_modulo',
|
||||
'tagente_modulo',
|
||||
'id_agente_modulo',
|
||||
$id_agent_module
|
||||
);
|
||||
}
|
||||
|
||||
$name_type = db_get_value('nombre', 'ttipo_modulo', 'id_tipo', $id_type);
|
||||
|
||||
|
|
|
@ -66,6 +66,9 @@ define('REPORT_STATUS_NOT_INIT', 3);
|
|||
define('REPORT_STATUS_DOWNTIME', 4);
|
||||
define('REPORT_STATUS_IGNORED', 5);
|
||||
|
||||
// Clases.
|
||||
use PandoraFMS\Module;
|
||||
|
||||
|
||||
function reporting_user_can_see_report($id_report, $id_user=null)
|
||||
{
|
||||
|
@ -699,7 +702,9 @@ function reporting_make_reporting_data(
|
|||
case 'last_value':
|
||||
$report['contents'][] = reporting_last_value(
|
||||
$report,
|
||||
$content
|
||||
$content,
|
||||
$datetime,
|
||||
$period
|
||||
);
|
||||
break;
|
||||
|
||||
|
@ -4071,46 +4076,44 @@ function reporting_database_serialized($report, $content)
|
|||
/**
|
||||
* Show last value and state of module.
|
||||
*
|
||||
* @param array $report Data report.
|
||||
* @param array $content Content report.
|
||||
* @param array $report Data report.
|
||||
* @param array $content Content report.
|
||||
* @param integer $datetime Date limit of report.
|
||||
* @param integer $init_date Init date of report.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
function reporting_last_value($report, $content)
|
||||
function reporting_last_value($report, $content, $datetime, $period)
|
||||
{
|
||||
global $config;
|
||||
|
||||
try {
|
||||
$id_meta = null;
|
||||
if (is_metaconsole()) {
|
||||
$id_meta = metaconsole_get_id_server($content['server_name']);
|
||||
$server = metaconsole_get_connection_by_id($id_meta);
|
||||
}
|
||||
|
||||
$module = new Module($content['id_agent_module'], false, $server['id']);
|
||||
} catch (\Exception $e) {
|
||||
$result = [];
|
||||
return reporting_check_structure_content($result);
|
||||
}
|
||||
|
||||
$return['type'] = 'last_value';
|
||||
|
||||
if (empty($content['name'])) {
|
||||
$content['name'] = __('Last Value');
|
||||
}
|
||||
|
||||
if (is_metaconsole()) {
|
||||
$id_meta = metaconsole_get_id_server($content['server_name']);
|
||||
$server = metaconsole_get_connection_by_id($id_meta);
|
||||
if (metaconsole_connect($server) != NOERR) {
|
||||
$result = [];
|
||||
return reporting_check_structure_content($result);
|
||||
}
|
||||
}
|
||||
|
||||
$id_agent = agents_get_module_id(
|
||||
$content['id_agent_module']
|
||||
);
|
||||
$agent_alias = agents_get_alias($id_agent);
|
||||
$module_name = modules_get_agentmodule_name(
|
||||
$content['id_agent_module']
|
||||
);
|
||||
|
||||
$id_agent = $module->agent()->id_agente();
|
||||
$id_agent_module = $content['id_agent_module'];
|
||||
$agent_description = agents_get_description($id_agent);
|
||||
$agent_group = agents_get_agent_group($id_agent);
|
||||
$agent_address = agents_get_address($id_agent);
|
||||
|
||||
$module_description = modules_get_agentmodule_descripcion(
|
||||
$id_agent_module
|
||||
);
|
||||
$agent_alias = $module->agent()->alias();
|
||||
$module_name = $module->name();
|
||||
$agent_description = $module->agent()->comentarios();
|
||||
$agent_group = $module->agent()->group();
|
||||
$agent_address = $module->agent()->field['direccion'];
|
||||
$module_description = $module->descripcion();
|
||||
|
||||
$items_label = [
|
||||
'type' => $return['type'],
|
||||
|
@ -4138,22 +4141,63 @@ function reporting_last_value($report, $content)
|
|||
$return['pagebreak'] = $content['pagebreak'];
|
||||
$return['subtitle'] = $agent_alias.' - '.$module_name;
|
||||
$return['description'] = $content['description'];
|
||||
$return['date'] = reporting_get_date_text($report, $content);
|
||||
$return['agent_name_db'] = agents_get_name($id_agent);
|
||||
$return['agent_name_db'] = $module->agent()->id_agente();
|
||||
$return['agent_name'] = $agent_alias;
|
||||
$return['module_name'] = $module_name;
|
||||
$return['date'] = reporting_get_date_text($report, $content);
|
||||
|
||||
$sql = sprintf(
|
||||
'SELECT *
|
||||
FROM tagente_estado
|
||||
WHERE id_agente_modulo = %s',
|
||||
$content['id_agent_module']
|
||||
);
|
||||
$result = $module->getStatus()->toArray();
|
||||
|
||||
$result = db_get_row_sql($sql);
|
||||
if ($result === false
|
||||
|| $result['estado'] == AGENT_MODULE_STATUS_NO_DATA
|
||||
|| $result['estado'] == AGENT_MODULE_STATUS_NOT_INIT
|
||||
) {
|
||||
$result['utimestamp'] = '';
|
||||
$result['datos'] = __('No data to display within the selected interval');
|
||||
}
|
||||
|
||||
if ($result === false) {
|
||||
$result = [];
|
||||
if ($datetime < $result['utimestamp']) {
|
||||
$id_tipo_modulo = $module->id_tipo_modulo();
|
||||
$table_data = modules_get_table_data(null, $id_tipo_modulo);
|
||||
if ($period !== null) {
|
||||
$sql = sprintf(
|
||||
'SELECT datos, utimestamp FROM %s WHERE id_agente_modulo = %d AND utimestamp BETWEEN %d AND %d ORDER BY utimestamp DESC',
|
||||
$table_data,
|
||||
$id_agent_module,
|
||||
($datetime - $period),
|
||||
$datetime
|
||||
);
|
||||
} else {
|
||||
$sql = sprintf(
|
||||
'SELECT datos, utimestamp FROM %s WHERE id_agente_modulo = %d AND utimestamp <= %d ORDER BY utimestamp DESC',
|
||||
$table_data,
|
||||
$id_agent_module,
|
||||
$datetime
|
||||
);
|
||||
}
|
||||
|
||||
$search_in_history_db = db_search_in_history_db($datetime);
|
||||
|
||||
try {
|
||||
$module->connectNode();
|
||||
} catch (\Exception $e) {
|
||||
// Do not link items if failed to find them.
|
||||
$module->restoreConnection();
|
||||
}
|
||||
|
||||
$datos = db_get_row_sql($sql, $search_in_history_db);
|
||||
|
||||
// Restore if needed.
|
||||
$module->restoreConnection();
|
||||
|
||||
if ($datos !== false) {
|
||||
$result['datos'] = $datos['datos'];
|
||||
$result['utimestamp'] = $datos['utimestamp'];
|
||||
} else {
|
||||
$result['utimestamp'] = '-';
|
||||
$result['estado'] = AGENT_MODULE_STATUS_NO_DATA;
|
||||
$result['datos'] = __('No data to display within the selected interval');
|
||||
}
|
||||
}
|
||||
|
||||
$result['agent_name'] = $agent_alias;
|
||||
|
@ -4161,10 +4205,6 @@ function reporting_last_value($report, $content)
|
|||
|
||||
$return['data'] = $result;
|
||||
|
||||
if (is_metaconsole()) {
|
||||
metaconsole_restore_db();
|
||||
}
|
||||
|
||||
return reporting_check_structure_content($return);
|
||||
}
|
||||
|
||||
|
|
|
@ -251,6 +251,7 @@ function ui_print_message($message, $class='', $attributes='', $return=false, $t
|
|||
$icon_image = '';
|
||||
$no_close_bool = false;
|
||||
$force_style = '';
|
||||
$force_class = '';
|
||||
if (is_array($message)) {
|
||||
if (!empty($message['title'])) {
|
||||
$text_title = $message['title'];
|
||||
|
@ -271,6 +272,10 @@ function ui_print_message($message, $class='', $attributes='', $return=false, $t
|
|||
if (!empty($message['force_style'])) {
|
||||
$force_style = $message['force_style'];
|
||||
}
|
||||
|
||||
if (empty($message['force_class']) === false) {
|
||||
$force_class = $message['force_class'];
|
||||
}
|
||||
} else {
|
||||
$text_message = $message;
|
||||
}
|
||||
|
@ -319,6 +324,10 @@ function ui_print_message($message, $class='', $attributes='', $return=false, $t
|
|||
|
||||
$id = 'info_box_'.uniqid();
|
||||
|
||||
if (empty($force_class) === false) {
|
||||
$class = $class.' '.$force_class;
|
||||
}
|
||||
|
||||
// Use the no_meta parameter because this image is only in the base console.
|
||||
$output = '<table cellspacing="0" cellpadding="0" id="'.$id.'" '.$attributes.'
|
||||
class="info_box '.$id.' '.$class.' textodialogo" style="'.$force_style.'">
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2021 Adam Shaw
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,28 @@
|
|||
FullCalendar.globalLocales.push(
|
||||
(function() {
|
||||
"use strict";
|
||||
|
||||
var af = {
|
||||
code: "af",
|
||||
week: {
|
||||
dow: 1, // Maandag is die eerste dag van die week.
|
||||
doy: 4 // Die week wat die 4de Januarie bevat is die eerste week van die jaar.
|
||||
},
|
||||
buttonText: {
|
||||
prev: "Vorige",
|
||||
next: "Volgende",
|
||||
today: "Vandag",
|
||||
year: "Jaar",
|
||||
month: "Maand",
|
||||
week: "Week",
|
||||
day: "Dag",
|
||||
list: "Agenda"
|
||||
},
|
||||
allDayText: "Heeldag",
|
||||
moreLinkText: "Addisionele",
|
||||
noEventsText: "Daar is geen gebeurtenisse nie"
|
||||
};
|
||||
|
||||
return af;
|
||||
})()
|
||||
);
|
|
@ -0,0 +1,29 @@
|
|||
FullCalendar.globalLocales.push(
|
||||
(function() {
|
||||
"use strict";
|
||||
|
||||
var arDz = {
|
||||
code: "ar-dz",
|
||||
week: {
|
||||
dow: 0, // Sunday is the first day of the week.
|
||||
doy: 4 // The week that contains Jan 1st is the first week of the year.
|
||||
},
|
||||
direction: "rtl",
|
||||
buttonText: {
|
||||
prev: "السابق",
|
||||
next: "التالي",
|
||||
today: "اليوم",
|
||||
month: "شهر",
|
||||
week: "أسبوع",
|
||||
day: "يوم",
|
||||
list: "أجندة"
|
||||
},
|
||||
weekText: "أسبوع",
|
||||
allDayText: "اليوم كله",
|
||||
moreLinkText: "أخرى",
|
||||
noEventsText: "أي أحداث لعرض"
|
||||
};
|
||||
|
||||
return arDz;
|
||||
})()
|
||||
);
|
|
@ -0,0 +1,29 @@
|
|||
FullCalendar.globalLocales.push(
|
||||
(function() {
|
||||
"use strict";
|
||||
|
||||
var arKw = {
|
||||
code: "ar-kw",
|
||||
week: {
|
||||
dow: 0, // Sunday is the first day of the week.
|
||||
doy: 12 // The week that contains Jan 1st is the first week of the year.
|
||||
},
|
||||
direction: "rtl",
|
||||
buttonText: {
|
||||
prev: "السابق",
|
||||
next: "التالي",
|
||||
today: "اليوم",
|
||||
month: "شهر",
|
||||
week: "أسبوع",
|
||||
day: "يوم",
|
||||
list: "أجندة"
|
||||
},
|
||||
weekText: "أسبوع",
|
||||
allDayText: "اليوم كله",
|
||||
moreLinkText: "أخرى",
|
||||
noEventsText: "أي أحداث لعرض"
|
||||
};
|
||||
|
||||
return arKw;
|
||||
})()
|
||||
);
|
|
@ -0,0 +1,29 @@
|
|||
FullCalendar.globalLocales.push(
|
||||
(function() {
|
||||
"use strict";
|
||||
|
||||
var arLy = {
|
||||
code: "ar-ly",
|
||||
week: {
|
||||
dow: 6, // Saturday is the first day of the week.
|
||||
doy: 12 // The week that contains Jan 1st is the first week of the year.
|
||||
},
|
||||
direction: "rtl",
|
||||
buttonText: {
|
||||
prev: "السابق",
|
||||
next: "التالي",
|
||||
today: "اليوم",
|
||||
month: "شهر",
|
||||
week: "أسبوع",
|
||||
day: "يوم",
|
||||
list: "أجندة"
|
||||
},
|
||||
weekText: "أسبوع",
|
||||
allDayText: "اليوم كله",
|
||||
moreLinkText: "أخرى",
|
||||
noEventsText: "أي أحداث لعرض"
|
||||
};
|
||||
|
||||
return arLy;
|
||||
})()
|
||||
);
|
|
@ -0,0 +1,29 @@
|
|||
FullCalendar.globalLocales.push(
|
||||
(function() {
|
||||
"use strict";
|
||||
|
||||
var arMa = {
|
||||
code: "ar-ma",
|
||||
week: {
|
||||
dow: 6, // Saturday is the first day of the week.
|
||||
doy: 12 // The week that contains Jan 1st is the first week of the year.
|
||||
},
|
||||
direction: "rtl",
|
||||
buttonText: {
|
||||
prev: "السابق",
|
||||
next: "التالي",
|
||||
today: "اليوم",
|
||||
month: "شهر",
|
||||
week: "أسبوع",
|
||||
day: "يوم",
|
||||
list: "أجندة"
|
||||
},
|
||||
weekText: "أسبوع",
|
||||
allDayText: "اليوم كله",
|
||||
moreLinkText: "أخرى",
|
||||
noEventsText: "أي أحداث لعرض"
|
||||
};
|
||||
|
||||
return arMa;
|
||||
})()
|
||||
);
|
|
@ -0,0 +1,29 @@
|
|||
FullCalendar.globalLocales.push(
|
||||
(function() {
|
||||
"use strict";
|
||||
|
||||
var arSa = {
|
||||
code: "ar-sa",
|
||||
week: {
|
||||
dow: 0, // Sunday is the first day of the week.
|
||||
doy: 6 // The week that contains Jan 1st is the first week of the year.
|
||||
},
|
||||
direction: "rtl",
|
||||
buttonText: {
|
||||
prev: "السابق",
|
||||
next: "التالي",
|
||||
today: "اليوم",
|
||||
month: "شهر",
|
||||
week: "أسبوع",
|
||||
day: "يوم",
|
||||
list: "أجندة"
|
||||
},
|
||||
weekText: "أسبوع",
|
||||
allDayText: "اليوم كله",
|
||||
moreLinkText: "أخرى",
|
||||
noEventsText: "أي أحداث لعرض"
|
||||
};
|
||||
|
||||
return arSa;
|
||||
})()
|
||||
);
|
|
@ -0,0 +1,29 @@
|
|||
FullCalendar.globalLocales.push(
|
||||
(function() {
|
||||
"use strict";
|
||||
|
||||
var arTn = {
|
||||
code: "ar-tn",
|
||||
week: {
|
||||
dow: 1, // Monday is the first day of the week.
|
||||
doy: 4 // The week that contains Jan 4th is the first week of the year.
|
||||
},
|
||||
direction: "rtl",
|
||||
buttonText: {
|
||||
prev: "السابق",
|
||||
next: "التالي",
|
||||
today: "اليوم",
|
||||
month: "شهر",
|
||||
week: "أسبوع",
|
||||
day: "يوم",
|
||||
list: "أجندة"
|
||||
},
|
||||
weekText: "أسبوع",
|
||||
allDayText: "اليوم كله",
|
||||
moreLinkText: "أخرى",
|
||||
noEventsText: "أي أحداث لعرض"
|
||||
};
|
||||
|
||||
return arTn;
|
||||
})()
|
||||
);
|
|
@ -0,0 +1,29 @@
|
|||
FullCalendar.globalLocales.push(
|
||||
(function() {
|
||||
"use strict";
|
||||
|
||||
var ar = {
|
||||
code: "ar",
|
||||
week: {
|
||||
dow: 6, // Saturday is the first day of the week.
|
||||
doy: 12 // The week that contains Jan 1st is the first week of the year.
|
||||
},
|
||||
direction: "rtl",
|
||||
buttonText: {
|
||||
prev: "السابق",
|
||||
next: "التالي",
|
||||
today: "اليوم",
|
||||
month: "شهر",
|
||||
week: "أسبوع",
|
||||
day: "يوم",
|
||||
list: "أجندة"
|
||||
},
|
||||
weekText: "أسبوع",
|
||||
allDayText: "اليوم كله",
|
||||
moreLinkText: "أخرى",
|
||||
noEventsText: "أي أحداث لعرض"
|
||||
};
|
||||
|
||||
return ar;
|
||||
})()
|
||||
);
|
|
@ -0,0 +1,30 @@
|
|||
FullCalendar.globalLocales.push(
|
||||
(function() {
|
||||
"use strict";
|
||||
|
||||
var az = {
|
||||
code: "az",
|
||||
week: {
|
||||
dow: 1, // Monday is the first day of the week.
|
||||
doy: 4 // The week that contains Jan 4th is the first week of the year.
|
||||
},
|
||||
buttonText: {
|
||||
prev: "Əvvəl",
|
||||
next: "Sonra",
|
||||
today: "Bu Gün",
|
||||
month: "Ay",
|
||||
week: "Həftə",
|
||||
day: "Gün",
|
||||
list: "Gündəm"
|
||||
},
|
||||
weekText: "Həftə",
|
||||
allDayText: "Bütün Gün",
|
||||
moreLinkText: function(n) {
|
||||
return "+ daha çox " + n;
|
||||
},
|
||||
noEventsText: "Göstərmək üçün hadisə yoxdur"
|
||||
};
|
||||
|
||||
return az;
|
||||
})()
|
||||
);
|
|
@ -0,0 +1,29 @@
|
|||
FullCalendar.globalLocales.push(
|
||||
(function() {
|
||||
"use strict";
|
||||
|
||||
var bg = {
|
||||
code: "bg",
|
||||
week: {
|
||||
dow: 1, // Monday is the first day of the week.
|
||||
doy: 7 // The week that contains Jan 1st is the first week of the year.
|
||||
},
|
||||
buttonText: {
|
||||
prev: "назад",
|
||||
next: "напред",
|
||||
today: "днес",
|
||||
month: "Месец",
|
||||
week: "Седмица",
|
||||
day: "Ден",
|
||||
list: "График"
|
||||
},
|
||||
allDayText: "Цял ден",
|
||||
moreLinkText: function(n) {
|
||||
return "+още " + n;
|
||||
},
|
||||
noEventsText: "Няма събития за показване"
|
||||
};
|
||||
|
||||
return bg;
|
||||
})()
|
||||
);
|
|
@ -0,0 +1,30 @@
|
|||
FullCalendar.globalLocales.push(
|
||||
(function() {
|
||||
"use strict";
|
||||
|
||||
var bn = {
|
||||
code: "bn",
|
||||
week: {
|
||||
dow: 0, // Sunday is the first day of the week.
|
||||
doy: 6 // The week that contains Jan 1st is the first week of the year.
|
||||
},
|
||||
buttonText: {
|
||||
prev: "পেছনে",
|
||||
next: "সামনে",
|
||||
today: "আজ",
|
||||
month: "মাস",
|
||||
week: "সপ্তাহ",
|
||||
day: "দিন",
|
||||
list: "তালিকা"
|
||||
},
|
||||
weekText: "সপ্তাহ",
|
||||
allDayText: "সারাদিন",
|
||||
moreLinkText: function(n) {
|
||||
return "+অন্যান্য " + n;
|
||||
},
|
||||
noEventsText: "কোনো ইভেন্ট নেই"
|
||||
};
|
||||
|
||||
return bn;
|
||||
})()
|
||||
);
|
|
@ -0,0 +1,30 @@
|
|||
FullCalendar.globalLocales.push(
|
||||
(function() {
|
||||
"use strict";
|
||||
|
||||
var bs = {
|
||||
code: "bs",
|
||||
week: {
|
||||
dow: 1, // Monday is the first day of the week.
|
||||
doy: 7 // The week that contains Jan 1st is the first week of the year.
|
||||
},
|
||||
buttonText: {
|
||||
prev: "Prošli",
|
||||
next: "Sljedeći",
|
||||
today: "Danas",
|
||||
month: "Mjesec",
|
||||
week: "Sedmica",
|
||||
day: "Dan",
|
||||
list: "Raspored"
|
||||
},
|
||||
weekText: "Sed",
|
||||
allDayText: "Cijeli dan",
|
||||
moreLinkText: function(n) {
|
||||
return "+ još " + n;
|
||||
},
|
||||
noEventsText: "Nema događaja za prikazivanje"
|
||||
};
|
||||
|
||||
return bs;
|
||||
})()
|
||||
);
|
|
@ -0,0 +1,28 @@
|
|||
FullCalendar.globalLocales.push(
|
||||
(function() {
|
||||
"use strict";
|
||||
|
||||
var ca = {
|
||||
code: "ca",
|
||||
week: {
|
||||
dow: 1, // Monday is the first day of the week.
|
||||
doy: 4 // The week that contains Jan 4th is the first week of the year.
|
||||
},
|
||||
buttonText: {
|
||||
prev: "Anterior",
|
||||
next: "Següent",
|
||||
today: "Avui",
|
||||
month: "Mes",
|
||||
week: "Setmana",
|
||||
day: "Dia",
|
||||
list: "Agenda"
|
||||
},
|
||||
weekText: "Set",
|
||||
allDayText: "Tot el dia",
|
||||
moreLinkText: "més",
|
||||
noEventsText: "No hi ha esdeveniments per mostrar"
|
||||
};
|
||||
|
||||
return ca;
|
||||
})()
|
||||
);
|
|
@ -0,0 +1,30 @@
|
|||
FullCalendar.globalLocales.push(
|
||||
(function() {
|
||||
"use strict";
|
||||
|
||||
var cs = {
|
||||
code: "cs",
|
||||
week: {
|
||||
dow: 1, // Monday is the first day of the week.
|
||||
doy: 4 // The week that contains Jan 4th is the first week of the year.
|
||||
},
|
||||
buttonText: {
|
||||
prev: "Dříve",
|
||||
next: "Později",
|
||||
today: "Nyní",
|
||||
month: "Měsíc",
|
||||
week: "Týden",
|
||||
day: "Den",
|
||||
list: "Agenda"
|
||||
},
|
||||
weekText: "Týd",
|
||||
allDayText: "Celý den",
|
||||
moreLinkText: function(n) {
|
||||
return "+další: " + n;
|
||||
},
|
||||
noEventsText: "Žádné akce k zobrazení"
|
||||
};
|
||||
|
||||
return cs;
|
||||
})()
|
||||
);
|
|
@ -0,0 +1,29 @@
|
|||
FullCalendar.globalLocales.push(
|
||||
(function() {
|
||||
"use strict";
|
||||
|
||||
var cy = {
|
||||
code: "cy",
|
||||
week: {
|
||||
dow: 1, // Monday is the first day of the week.
|
||||
doy: 4 // The week that contains Jan 4th is the first week of the year.
|
||||
},
|
||||
buttonText: {
|
||||
prev: "Blaenorol",
|
||||
next: "Nesaf",
|
||||
today: "Heddiw",
|
||||
year: "Blwyddyn",
|
||||
month: "Mis",
|
||||
week: "Wythnos",
|
||||
day: "Dydd",
|
||||
list: "Rhestr"
|
||||
},
|
||||
weekText: "Wythnos",
|
||||
allDayText: "Trwy'r dydd",
|
||||
moreLinkText: "Mwy",
|
||||
noEventsText: "Dim digwyddiadau"
|
||||
};
|
||||
|
||||
return cy;
|
||||
})()
|
||||
);
|
|
@ -0,0 +1,28 @@
|
|||
FullCalendar.globalLocales.push(
|
||||
(function() {
|
||||
"use strict";
|
||||
|
||||
var da = {
|
||||
code: "da",
|
||||
week: {
|
||||
dow: 1, // Monday is the first day of the week.
|
||||
doy: 4 // The week that contains Jan 4th is the first week of the year.
|
||||
},
|
||||
buttonText: {
|
||||
prev: "Forrige",
|
||||
next: "Næste",
|
||||
today: "I dag",
|
||||
month: "Måned",
|
||||
week: "Uge",
|
||||
day: "Dag",
|
||||
list: "Agenda"
|
||||
},
|
||||
weekText: "Uge",
|
||||
allDayText: "Hele dagen",
|
||||
moreLinkText: "flere",
|
||||
noEventsText: "Ingen arrangementer at vise"
|
||||
};
|
||||
|
||||
return da;
|
||||
})()
|
||||
);
|
|
@ -0,0 +1,73 @@
|
|||
FullCalendar.globalLocales.push(
|
||||
(function() {
|
||||
"use strict";
|
||||
|
||||
function affix(buttonText) {
|
||||
return buttonText === "Tag" || buttonText === "Monat"
|
||||
? "r"
|
||||
: buttonText === "Jahr"
|
||||
? "s"
|
||||
: "";
|
||||
}
|
||||
|
||||
var deAt = {
|
||||
code: "de-at",
|
||||
week: {
|
||||
dow: 1, // Monday is the first day of the week.
|
||||
doy: 4 // The week that contains Jan 4th is the first week of the year.
|
||||
},
|
||||
buttonText: {
|
||||
prev: "Zurück",
|
||||
next: "Vor",
|
||||
today: "Heute",
|
||||
year: "Jahr",
|
||||
month: "Monat",
|
||||
week: "Woche",
|
||||
day: "Tag",
|
||||
list: "Terminübersicht"
|
||||
},
|
||||
weekText: "KW",
|
||||
weekTextLong: "Woche",
|
||||
allDayText: "Ganztägig",
|
||||
moreLinkText: function(n) {
|
||||
return "+ weitere " + n;
|
||||
},
|
||||
noEventsText: "Keine Ereignisse anzuzeigen",
|
||||
buttonHints: {
|
||||
prev(buttonText) {
|
||||
return `Vorherige${affix(buttonText)} ${buttonText}`;
|
||||
},
|
||||
next(buttonText) {
|
||||
return `Nächste${affix(buttonText)} ${buttonText}`;
|
||||
},
|
||||
today(buttonText) {
|
||||
// → Heute, Diese Woche, Dieser Monat, Dieses Jahr
|
||||
if (buttonText === "Tag") {
|
||||
return "Heute";
|
||||
}
|
||||
return `Diese${affix(buttonText)} ${buttonText}`;
|
||||
}
|
||||
},
|
||||
viewHint(buttonText) {
|
||||
// → Tagesansicht, Wochenansicht, Monatsansicht, Jahresansicht
|
||||
const glue =
|
||||
buttonText === "Woche" ? "n" : buttonText === "Monat" ? "s" : "es";
|
||||
return buttonText + glue + "ansicht";
|
||||
},
|
||||
navLinkHint: "Gehe zu $0",
|
||||
moreLinkHint(eventCnt) {
|
||||
return (
|
||||
"Zeige " +
|
||||
(eventCnt === 1
|
||||
? "ein weiteres Ereignis"
|
||||
: eventCnt + " weitere Ereignisse")
|
||||
);
|
||||
},
|
||||
closeHint: "Schließen",
|
||||
timeHint: "Uhrzeit",
|
||||
eventHint: "Ereignis"
|
||||
};
|
||||
|
||||
return deAt;
|
||||
})()
|
||||
);
|
|
@ -0,0 +1,73 @@
|
|||
FullCalendar.globalLocales.push(
|
||||
(function() {
|
||||
"use strict";
|
||||
|
||||
function affix(buttonText) {
|
||||
return buttonText === "Tag" || buttonText === "Monat"
|
||||
? "r"
|
||||
: buttonText === "Jahr"
|
||||
? "s"
|
||||
: "";
|
||||
}
|
||||
|
||||
var de = {
|
||||
code: "de",
|
||||
week: {
|
||||
dow: 1, // Monday is the first day of the week.
|
||||
doy: 4 // The week that contains Jan 4th is the first week of the year.
|
||||
},
|
||||
buttonText: {
|
||||
prev: "Zurück",
|
||||
next: "Vor",
|
||||
today: "Heute",
|
||||
year: "Jahr",
|
||||
month: "Monat",
|
||||
week: "Woche",
|
||||
day: "Tag",
|
||||
list: "Terminübersicht"
|
||||
},
|
||||
weekText: "KW",
|
||||
weekTextLong: "Woche",
|
||||
allDayText: "Ganztägig",
|
||||
moreLinkText: function(n) {
|
||||
return "+ weitere " + n;
|
||||
},
|
||||
noEventsText: "Keine Ereignisse anzuzeigen",
|
||||
buttonHints: {
|
||||
prev(buttonText) {
|
||||
return `Vorherige${affix(buttonText)} ${buttonText}`;
|
||||
},
|
||||
next(buttonText) {
|
||||
return `Nächste${affix(buttonText)} ${buttonText}`;
|
||||
},
|
||||
today(buttonText) {
|
||||
// → Heute, Diese Woche, Dieser Monat, Dieses Jahr
|
||||
if (buttonText === "Tag") {
|
||||
return "Heute";
|
||||
}
|
||||
return `Diese${affix(buttonText)} ${buttonText}`;
|
||||
}
|
||||
},
|
||||
viewHint(buttonText) {
|
||||
// → Tagesansicht, Wochenansicht, Monatsansicht, Jahresansicht
|
||||
const glue =
|
||||
buttonText === "Woche" ? "n" : buttonText === "Monat" ? "s" : "es";
|
||||
return buttonText + glue + "ansicht";
|
||||
},
|
||||
navLinkHint: "Gehe zu $0",
|
||||
moreLinkHint(eventCnt) {
|
||||
return (
|
||||
"Zeige " +
|
||||
(eventCnt === 1
|
||||
? "ein weiteres Ereignis"
|
||||
: eventCnt + " weitere Ereignisse")
|
||||
);
|
||||
},
|
||||
closeHint: "Schließen",
|
||||
timeHint: "Uhrzeit",
|
||||
eventHint: "Ereignis"
|
||||
};
|
||||
|
||||
return de;
|
||||
})()
|
||||
);
|
|
@ -0,0 +1,28 @@
|
|||
FullCalendar.globalLocales.push(
|
||||
(function() {
|
||||
"use strict";
|
||||
|
||||
var el = {
|
||||
code: "el",
|
||||
week: {
|
||||
dow: 1, // Monday is the first day of the week.
|
||||
doy: 4 // The week that contains Jan 4st is the first week of the year.
|
||||
},
|
||||
buttonText: {
|
||||
prev: "Προηγούμενος",
|
||||
next: "Επόμενος",
|
||||
today: "Σήμερα",
|
||||
month: "Μήνας",
|
||||
week: "Εβδομάδα",
|
||||
day: "Ημέρα",
|
||||
list: "Ατζέντα"
|
||||
},
|
||||
weekText: "Εβδ",
|
||||
allDayText: "Ολοήμερο",
|
||||
moreLinkText: "περισσότερα",
|
||||
noEventsText: "Δεν υπάρχουν γεγονότα προς εμφάνιση"
|
||||
};
|
||||
|
||||
return el;
|
||||
})()
|
||||
);
|
|
@ -0,0 +1,25 @@
|
|||
FullCalendar.globalLocales.push(
|
||||
(function() {
|
||||
"use strict";
|
||||
|
||||
var enAu = {
|
||||
code: "en-au",
|
||||
week: {
|
||||
dow: 1, // Monday is the first day of the week.
|
||||
doy: 4 // The week that contains Jan 4th is the first week of the year.
|
||||
},
|
||||
buttonHints: {
|
||||
prev: "Previous $0",
|
||||
next: "Next $0",
|
||||
today: "This $0"
|
||||
},
|
||||
viewHint: "$0 view",
|
||||
navLinkHint: "Go to $0",
|
||||
moreLinkHint(eventCnt) {
|
||||
return `Show ${eventCnt} more event${eventCnt === 1 ? "" : "s"}`;
|
||||
}
|
||||
};
|
||||
|
||||
return enAu;
|
||||
})()
|
||||
);
|
|
@ -0,0 +1,25 @@
|
|||
FullCalendar.globalLocales.push(
|
||||
(function() {
|
||||
"use strict";
|
||||
|
||||
var enGb = {
|
||||
code: "en-gb",
|
||||
week: {
|
||||
dow: 1, // Monday is the first day of the week.
|
||||
doy: 4 // The week that contains Jan 4th is the first week of the year.
|
||||
},
|
||||
buttonHints: {
|
||||
prev: "Previous $0",
|
||||
next: "Next $0",
|
||||
today: "This $0"
|
||||
},
|
||||
viewHint: "$0 view",
|
||||
navLinkHint: "Go to $0",
|
||||
moreLinkHint(eventCnt) {
|
||||
return `Show ${eventCnt} more event${eventCnt === 1 ? "" : "s"}`;
|
||||
}
|
||||
};
|
||||
|
||||
return enGb;
|
||||
})()
|
||||
);
|
|
@ -0,0 +1,25 @@
|
|||
FullCalendar.globalLocales.push(
|
||||
(function() {
|
||||
"use strict";
|
||||
|
||||
var enNz = {
|
||||
code: "en-nz",
|
||||
week: {
|
||||
dow: 1, // Monday is the first day of the week.
|
||||
doy: 4 // The week that contains Jan 4th is the first week of the year.
|
||||
},
|
||||
buttonHints: {
|
||||
prev: "Previous $0",
|
||||
next: "Next $0",
|
||||
today: "This $0"
|
||||
},
|
||||
viewHint: "$0 view",
|
||||
navLinkHint: "Go to $0",
|
||||
moreLinkHint(eventCnt) {
|
||||
return `Show ${eventCnt} more event${eventCnt === 1 ? "" : "s"}`;
|
||||
}
|
||||
};
|
||||
|
||||
return enNz;
|
||||
})()
|
||||
);
|
|
@ -0,0 +1,28 @@
|
|||
FullCalendar.globalLocales.push(
|
||||
(function() {
|
||||
"use strict";
|
||||
|
||||
var eo = {
|
||||
code: "eo",
|
||||
week: {
|
||||
dow: 1, // Monday is the first day of the week.
|
||||
doy: 4 // The week that contains Jan 4th is the first week of the year.
|
||||
},
|
||||
buttonText: {
|
||||
prev: "Antaŭa",
|
||||
next: "Sekva",
|
||||
today: "Hodiaŭ",
|
||||
month: "Monato",
|
||||
week: "Semajno",
|
||||
day: "Tago",
|
||||
list: "Tagordo"
|
||||
},
|
||||
weekText: "Sm",
|
||||
allDayText: "Tuta tago",
|
||||
moreLinkText: "pli",
|
||||
noEventsText: "Neniuj eventoj por montri"
|
||||
};
|
||||
|
||||
return eo;
|
||||
})()
|
||||
);
|
|
@ -0,0 +1,28 @@
|
|||
FullCalendar.globalLocales.push(
|
||||
(function() {
|
||||
"use strict";
|
||||
|
||||
var esUs = {
|
||||
code: "es",
|
||||
week: {
|
||||
dow: 0, // Sunday is the first day of the week.
|
||||
doy: 6 // The week that contains Jan 1st is the first week of the year.
|
||||
},
|
||||
buttonText: {
|
||||
prev: "Ant",
|
||||
next: "Sig",
|
||||
today: "Hoy",
|
||||
month: "Mes",
|
||||
week: "Semana",
|
||||
day: "Día",
|
||||
list: "Agenda"
|
||||
},
|
||||
weekText: "Sm",
|
||||
allDayText: "Todo el día",
|
||||
moreLinkText: "más",
|
||||
noEventsText: "No hay eventos para mostrar"
|
||||
};
|
||||
|
||||
return esUs;
|
||||
})()
|
||||
);
|
|
@ -0,0 +1,55 @@
|
|||
FullCalendar.globalLocales.push(
|
||||
(function() {
|
||||
"use strict";
|
||||
|
||||
var es = {
|
||||
code: "es",
|
||||
week: {
|
||||
dow: 1, // Monday is the first day of the week.
|
||||
doy: 4 // The week that contains Jan 4th is the first week of the year.
|
||||
},
|
||||
buttonText: {
|
||||
prev: "Ant",
|
||||
next: "Sig",
|
||||
today: "Hoy",
|
||||
month: "Mes",
|
||||
week: "Semana",
|
||||
day: "Día",
|
||||
list: "Agenda"
|
||||
},
|
||||
buttonHints: {
|
||||
prev: "$0 antes",
|
||||
next: "$0 siguiente",
|
||||
today(buttonText) {
|
||||
return buttonText === "Día"
|
||||
? "Hoy"
|
||||
: (buttonText === "Semana" ? "Esta" : "Este") +
|
||||
" " +
|
||||
buttonText.toLocaleLowerCase();
|
||||
}
|
||||
},
|
||||
viewHint(buttonText) {
|
||||
return (
|
||||
"Vista " +
|
||||
(buttonText === "Semana" ? "de la" : "del") +
|
||||
" " +
|
||||
buttonText.toLocaleLowerCase()
|
||||
);
|
||||
},
|
||||
weekText: "Sm",
|
||||
weekTextLong: "Semana",
|
||||
allDayText: "Todo el día",
|
||||
moreLinkText: "más",
|
||||
moreLinkHint(eventCnt) {
|
||||
return `Mostrar ${eventCnt} eventos más`;
|
||||
},
|
||||
noEventsText: "No hay eventos para mostrar",
|
||||
navLinkHint: "Ir al $0",
|
||||
closeHint: "Cerrar",
|
||||
timeHint: "La hora",
|
||||
eventHint: "Evento"
|
||||
};
|
||||
|
||||
return es;
|
||||
})()
|
||||
);
|
|
@ -0,0 +1,30 @@
|
|||
FullCalendar.globalLocales.push(
|
||||
(function() {
|
||||
"use strict";
|
||||
|
||||
var et = {
|
||||
code: "et",
|
||||
week: {
|
||||
dow: 1, // Monday is the first day of the week.
|
||||
doy: 4 // The week that contains Jan 4th is the first week of the year.
|
||||
},
|
||||
buttonText: {
|
||||
prev: "Eelnev",
|
||||
next: "Järgnev",
|
||||
today: "Täna",
|
||||
month: "Kuu",
|
||||
week: "Nädal",
|
||||
day: "Päev",
|
||||
list: "Päevakord"
|
||||
},
|
||||
weekText: "näd",
|
||||
allDayText: "Kogu päev",
|
||||
moreLinkText: function(n) {
|
||||
return "+ veel " + n;
|
||||
},
|
||||
noEventsText: "Kuvamiseks puuduvad sündmused"
|
||||
};
|
||||
|
||||
return et;
|
||||
})()
|
||||
);
|
|
@ -0,0 +1,28 @@
|
|||
FullCalendar.globalLocales.push(
|
||||
(function() {
|
||||
"use strict";
|
||||
|
||||
var eu = {
|
||||
code: "eu",
|
||||
week: {
|
||||
dow: 1, // Monday is the first day of the week.
|
||||
doy: 7 // The week that contains Jan 1st is the first week of the year.
|
||||
},
|
||||
buttonText: {
|
||||
prev: "Aur",
|
||||
next: "Hur",
|
||||
today: "Gaur",
|
||||
month: "Hilabetea",
|
||||
week: "Astea",
|
||||
day: "Eguna",
|
||||
list: "Agenda"
|
||||
},
|
||||
weekText: "As",
|
||||
allDayText: "Egun osoa",
|
||||
moreLinkText: "gehiago",
|
||||
noEventsText: "Ez dago ekitaldirik erakusteko"
|
||||
};
|
||||
|
||||
return eu;
|
||||
})()
|
||||
);
|
|
@ -0,0 +1,31 @@
|
|||
FullCalendar.globalLocales.push(
|
||||
(function() {
|
||||
"use strict";
|
||||
|
||||
var fa = {
|
||||
code: "fa",
|
||||
week: {
|
||||
dow: 6, // Saturday is the first day of the week.
|
||||
doy: 12 // The week that contains Jan 1st is the first week of the year.
|
||||
},
|
||||
direction: "rtl",
|
||||
buttonText: {
|
||||
prev: "قبلی",
|
||||
next: "بعدی",
|
||||
today: "امروز",
|
||||
month: "ماه",
|
||||
week: "هفته",
|
||||
day: "روز",
|
||||
list: "برنامه"
|
||||
},
|
||||
weekText: "هف",
|
||||
allDayText: "تمام روز",
|
||||
moreLinkText: function(n) {
|
||||
return "بیش از " + n;
|
||||
},
|
||||
noEventsText: "هیچ رویدادی به نمایش"
|
||||
};
|
||||
|
||||
return fa;
|
||||
})()
|
||||
);
|
|
@ -0,0 +1,28 @@
|
|||
FullCalendar.globalLocales.push(
|
||||
(function() {
|
||||
"use strict";
|
||||
|
||||
var fi = {
|
||||
code: "fi",
|
||||
week: {
|
||||
dow: 1, // Monday is the first day of the week.
|
||||
doy: 4 // The week that contains Jan 4th is the first week of the year.
|
||||
},
|
||||
buttonText: {
|
||||
prev: "Edellinen",
|
||||
next: "Seuraava",
|
||||
today: "Tänään",
|
||||
month: "Kuukausi",
|
||||
week: "Viikko",
|
||||
day: "Päivä",
|
||||
list: "Tapahtumat"
|
||||
},
|
||||
weekText: "Vk",
|
||||
allDayText: "Koko päivä",
|
||||
moreLinkText: "lisää",
|
||||
noEventsText: "Ei näytettäviä tapahtumia"
|
||||
};
|
||||
|
||||
return fi;
|
||||
})()
|
||||
);
|
|
@ -0,0 +1,25 @@
|
|||
FullCalendar.globalLocales.push(
|
||||
(function() {
|
||||
"use strict";
|
||||
|
||||
var frCa = {
|
||||
code: "fr",
|
||||
buttonText: {
|
||||
prev: "Précédent",
|
||||
next: "Suivant",
|
||||
today: "Aujourd'hui",
|
||||
year: "Année",
|
||||
month: "Mois",
|
||||
week: "Semaine",
|
||||
day: "Jour",
|
||||
list: "Mon planning"
|
||||
},
|
||||
weekText: "Sem.",
|
||||
allDayText: "Toute la journée",
|
||||
moreLinkText: "en plus",
|
||||
noEventsText: "Aucun événement à afficher"
|
||||
};
|
||||
|
||||
return frCa;
|
||||
})()
|
||||
);
|
|
@ -0,0 +1,29 @@
|
|||
FullCalendar.globalLocales.push(
|
||||
(function() {
|
||||
"use strict";
|
||||
|
||||
var frCh = {
|
||||
code: "fr-ch",
|
||||
week: {
|
||||
dow: 1, // Monday is the first day of the week.
|
||||
doy: 4 // The week that contains Jan 4th is the first week of the year.
|
||||
},
|
||||
buttonText: {
|
||||
prev: "Précédent",
|
||||
next: "Suivant",
|
||||
today: "Courant",
|
||||
year: "Année",
|
||||
month: "Mois",
|
||||
week: "Semaine",
|
||||
day: "Jour",
|
||||
list: "Mon planning"
|
||||
},
|
||||
weekText: "Sm",
|
||||
allDayText: "Toute la journée",
|
||||
moreLinkText: "en plus",
|
||||
noEventsText: "Aucun événement à afficher"
|
||||
};
|
||||
|
||||
return frCh;
|
||||
})()
|
||||
);
|
|
@ -0,0 +1,29 @@
|
|||
FullCalendar.globalLocales.push(
|
||||
(function() {
|
||||
"use strict";
|
||||
|
||||
var fr = {
|
||||
code: "fr",
|
||||
week: {
|
||||
dow: 1, // Monday is the first day of the week.
|
||||
doy: 4 // The week that contains Jan 4th is the first week of the year.
|
||||
},
|
||||
buttonText: {
|
||||
prev: "Précédent",
|
||||
next: "Suivant",
|
||||
today: "Aujourd'hui",
|
||||
year: "Année",
|
||||
month: "Mois",
|
||||
week: "Semaine",
|
||||
day: "Jour",
|
||||
list: "Planning"
|
||||
},
|
||||
weekText: "Sem.",
|
||||
allDayText: "Toute la journée",
|
||||
moreLinkText: "en plus",
|
||||
noEventsText: "Aucun événement à afficher"
|
||||
};
|
||||
|
||||
return fr;
|
||||
})()
|
||||
);
|
|
@ -0,0 +1,28 @@
|
|||
FullCalendar.globalLocales.push(
|
||||
(function() {
|
||||
"use strict";
|
||||
|
||||
var gl = {
|
||||
code: "gl",
|
||||
week: {
|
||||
dow: 1, // Monday is the first day of the week.
|
||||
doy: 4 // The week that contains Jan 4th is the first week of the year.
|
||||
},
|
||||
buttonText: {
|
||||
prev: "Ant",
|
||||
next: "Seg",
|
||||
today: "Hoxe",
|
||||
month: "Mes",
|
||||
week: "Semana",
|
||||
day: "Día",
|
||||
list: "Axenda"
|
||||
},
|
||||
weekText: "Sm",
|
||||
allDayText: "Todo o día",
|
||||
moreLinkText: "máis",
|
||||
noEventsText: "Non hai eventos para amosar"
|
||||
};
|
||||
|
||||
return gl;
|
||||
})()
|
||||
);
|
|
@ -0,0 +1,25 @@
|
|||
FullCalendar.globalLocales.push(
|
||||
(function() {
|
||||
"use strict";
|
||||
|
||||
var he = {
|
||||
code: "he",
|
||||
direction: "rtl",
|
||||
buttonText: {
|
||||
prev: "הקודם",
|
||||
next: "הבא",
|
||||
today: "היום",
|
||||
month: "חודש",
|
||||
week: "שבוע",
|
||||
day: "יום",
|
||||
list: "סדר יום"
|
||||
},
|
||||
allDayText: "כל היום",
|
||||
moreLinkText: "אחר",
|
||||
noEventsText: "אין אירועים להצגה",
|
||||
weekText: "שבוע"
|
||||
};
|
||||
|
||||
return he;
|
||||
})()
|
||||
);
|
|
@ -0,0 +1,30 @@
|
|||
FullCalendar.globalLocales.push(
|
||||
(function() {
|
||||
"use strict";
|
||||
|
||||
var hi = {
|
||||
code: "hi",
|
||||
week: {
|
||||
dow: 0, // Sunday is the first day of the week.
|
||||
doy: 6 // The week that contains Jan 1st is the first week of the year.
|
||||
},
|
||||
buttonText: {
|
||||
prev: "पिछला",
|
||||
next: "अगला",
|
||||
today: "आज",
|
||||
month: "महीना",
|
||||
week: "सप्ताह",
|
||||
day: "दिन",
|
||||
list: "कार्यसूची"
|
||||
},
|
||||
weekText: "हफ्ता",
|
||||
allDayText: "सभी दिन",
|
||||
moreLinkText: function(n) {
|
||||
return "+अधिक " + n;
|
||||
},
|
||||
noEventsText: "कोई घटनाओं को प्रदर्शित करने के लिए"
|
||||
};
|
||||
|
||||
return hi;
|
||||
})()
|
||||
);
|
|
@ -0,0 +1,30 @@
|
|||
FullCalendar.globalLocales.push(
|
||||
(function() {
|
||||
"use strict";
|
||||
|
||||
var hr = {
|
||||
code: "hr",
|
||||
week: {
|
||||
dow: 1, // Monday is the first day of the week.
|
||||
doy: 7 // The week that contains Jan 1st is the first week of the year.
|
||||
},
|
||||
buttonText: {
|
||||
prev: "Prijašnji",
|
||||
next: "Sljedeći",
|
||||
today: "Danas",
|
||||
month: "Mjesec",
|
||||
week: "Tjedan",
|
||||
day: "Dan",
|
||||
list: "Raspored"
|
||||
},
|
||||
weekText: "Tje",
|
||||
allDayText: "Cijeli dan",
|
||||
moreLinkText: function(n) {
|
||||
return "+ još " + n;
|
||||
},
|
||||
noEventsText: "Nema događaja za prikaz"
|
||||
};
|
||||
|
||||
return hr;
|
||||
})()
|
||||
);
|
|
@ -0,0 +1,28 @@
|
|||
FullCalendar.globalLocales.push(
|
||||
(function() {
|
||||
"use strict";
|
||||
|
||||
var hu = {
|
||||
code: "hu",
|
||||
week: {
|
||||
dow: 1, // Monday is the first day of the week.
|
||||
doy: 4 // The week that contains Jan 4th is the first week of the year.
|
||||
},
|
||||
buttonText: {
|
||||
prev: "vissza",
|
||||
next: "előre",
|
||||
today: "ma",
|
||||
month: "Hónap",
|
||||
week: "Hét",
|
||||
day: "Nap",
|
||||
list: "Lista"
|
||||
},
|
||||
weekText: "Hét",
|
||||
allDayText: "Egész nap",
|
||||
moreLinkText: "további",
|
||||
noEventsText: "Nincs megjeleníthető esemény"
|
||||
};
|
||||
|
||||
return hu;
|
||||
})()
|
||||
);
|
|
@ -0,0 +1,30 @@
|
|||
FullCalendar.globalLocales.push(
|
||||
(function() {
|
||||
"use strict";
|
||||
|
||||
var hyAm = {
|
||||
code: "hy-am",
|
||||
week: {
|
||||
dow: 1, // Monday is the first day of the week.
|
||||
doy: 4 // The week that contains Jan 4th is the first week of the year.
|
||||
},
|
||||
buttonText: {
|
||||
prev: "Նախորդ",
|
||||
next: "Հաջորդ",
|
||||
today: "Այսօր",
|
||||
month: "Ամիս",
|
||||
week: "Շաբաթ",
|
||||
day: "Օր",
|
||||
list: "Օրվա ցուցակ"
|
||||
},
|
||||
weekText: "Շաբ",
|
||||
allDayText: "Ամբողջ օր",
|
||||
moreLinkText: function(n) {
|
||||
return "+ ևս " + n;
|
||||
},
|
||||
noEventsText: "Բացակայում է իրադարձությունը ցուցադրելու"
|
||||
};
|
||||
|
||||
return hyAm;
|
||||
})()
|
||||
);
|
|
@ -0,0 +1,28 @@
|
|||
FullCalendar.globalLocales.push(
|
||||
(function() {
|
||||
"use strict";
|
||||
|
||||
var id = {
|
||||
code: "id",
|
||||
week: {
|
||||
dow: 1, // Monday is the first day of the week.
|
||||
doy: 7 // The week that contains Jan 1st is the first week of the year.
|
||||
},
|
||||
buttonText: {
|
||||
prev: "mundur",
|
||||
next: "maju",
|
||||
today: "hari ini",
|
||||
month: "Bulan",
|
||||
week: "Minggu",
|
||||
day: "Hari",
|
||||
list: "Agenda"
|
||||
},
|
||||
weekText: "Mg",
|
||||
allDayText: "Sehari penuh",
|
||||
moreLinkText: "lebih",
|
||||
noEventsText: "Tidak ada acara untuk ditampilkan"
|
||||
};
|
||||
|
||||
return id;
|
||||
})()
|
||||
);
|
|
@ -0,0 +1,28 @@
|
|||
FullCalendar.globalLocales.push(
|
||||
(function() {
|
||||
"use strict";
|
||||
|
||||
var is = {
|
||||
code: "is",
|
||||
week: {
|
||||
dow: 1, // Monday is the first day of the week.
|
||||
doy: 4 // The week that contains Jan 4th is the first week of the year.
|
||||
},
|
||||
buttonText: {
|
||||
prev: "Fyrri",
|
||||
next: "Næsti",
|
||||
today: "Í dag",
|
||||
month: "Mánuður",
|
||||
week: "Vika",
|
||||
day: "Dagur",
|
||||
list: "Dagskrá"
|
||||
},
|
||||
weekText: "Vika",
|
||||
allDayText: "Allan daginn",
|
||||
moreLinkText: "meira",
|
||||
noEventsText: "Engir viðburðir til að sýna"
|
||||
};
|
||||
|
||||
return is;
|
||||
})()
|
||||
);
|
|
@ -0,0 +1,30 @@
|
|||
FullCalendar.globalLocales.push(
|
||||
(function() {
|
||||
"use strict";
|
||||
|
||||
var it = {
|
||||
code: "it",
|
||||
week: {
|
||||
dow: 1, // Monday is the first day of the week.
|
||||
doy: 4 // The week that contains Jan 4th is the first week of the year.
|
||||
},
|
||||
buttonText: {
|
||||
prev: "Prec",
|
||||
next: "Succ",
|
||||
today: "Oggi",
|
||||
month: "Mese",
|
||||
week: "Settimana",
|
||||
day: "Giorno",
|
||||
list: "Agenda"
|
||||
},
|
||||
weekText: "Sm",
|
||||
allDayText: "Tutto il giorno",
|
||||
moreLinkText: function(n) {
|
||||
return "+altri " + n;
|
||||
},
|
||||
noEventsText: "Non ci sono eventi da visualizzare"
|
||||
};
|
||||
|
||||
return it;
|
||||
})()
|
||||
);
|
|
@ -0,0 +1,26 @@
|
|||
FullCalendar.globalLocales.push(
|
||||
(function() {
|
||||
"use strict";
|
||||
|
||||
var ja = {
|
||||
code: "ja",
|
||||
buttonText: {
|
||||
prev: "前",
|
||||
next: "次",
|
||||
today: "今日",
|
||||
month: "月",
|
||||
week: "週",
|
||||
day: "日",
|
||||
list: "予定リスト"
|
||||
},
|
||||
weekText: "週",
|
||||
allDayText: "終日",
|
||||
moreLinkText: function(n) {
|
||||
return "他 " + n + " 件";
|
||||
},
|
||||
noEventsText: "表示する予定はありません"
|
||||
};
|
||||
|
||||
return ja;
|
||||
})()
|
||||
);
|
|
@ -0,0 +1,30 @@
|
|||
FullCalendar.globalLocales.push(
|
||||
(function() {
|
||||
"use strict";
|
||||
|
||||
var ka = {
|
||||
code: "ka",
|
||||
week: {
|
||||
dow: 1,
|
||||
doy: 7
|
||||
},
|
||||
buttonText: {
|
||||
prev: "წინა",
|
||||
next: "შემდეგი",
|
||||
today: "დღეს",
|
||||
month: "თვე",
|
||||
week: "კვირა",
|
||||
day: "დღე",
|
||||
list: "დღის წესრიგი"
|
||||
},
|
||||
weekText: "კვ",
|
||||
allDayText: "მთელი დღე",
|
||||
moreLinkText: function(n) {
|
||||
return "+ კიდევ " + n;
|
||||
},
|
||||
noEventsText: "ღონისძიებები არ არის"
|
||||
};
|
||||
|
||||
return ka;
|
||||
})()
|
||||
);
|
|
@ -0,0 +1,30 @@
|
|||
FullCalendar.globalLocales.push(
|
||||
(function() {
|
||||
"use strict";
|
||||
|
||||
var kk = {
|
||||
code: "kk",
|
||||
week: {
|
||||
dow: 1, // Monday is the first day of the week.
|
||||
doy: 7 // The week that contains Jan 1st is the first week of the year.
|
||||
},
|
||||
buttonText: {
|
||||
prev: "Алдыңғы",
|
||||
next: "Келесі",
|
||||
today: "Бүгін",
|
||||
month: "Ай",
|
||||
week: "Апта",
|
||||
day: "Күн",
|
||||
list: "Күн тәртібі"
|
||||
},
|
||||
weekText: "Не",
|
||||
allDayText: "Күні бойы",
|
||||
moreLinkText: function(n) {
|
||||
return "+ тағы " + n;
|
||||
},
|
||||
noEventsText: "Көрсету үшін оқиғалар жоқ"
|
||||
};
|
||||
|
||||
return kk;
|
||||
})()
|
||||
);
|
|
@ -0,0 +1,29 @@
|
|||
FullCalendar.globalLocales.push(
|
||||
(function() {
|
||||
"use strict";
|
||||
|
||||
var km = {
|
||||
code: "km",
|
||||
week: {
|
||||
dow: 1, // Monday is the first day of the week.
|
||||
doy: 4 // The week that contains Jan 4th is the first week of the year.
|
||||
},
|
||||
buttonText: {
|
||||
prev: "មុន",
|
||||
next: "បន្ទាប់",
|
||||
today: "ថ្ងៃនេះ",
|
||||
year: "ឆ្នាំ",
|
||||
month: "ខែ",
|
||||
week: "សប្តាហ៍",
|
||||
day: "ថ្ងៃ",
|
||||
list: "បញ្ជី"
|
||||
},
|
||||
weekText: "សប្តាហ៍",
|
||||
allDayText: "ពេញមួយថ្ងៃ",
|
||||
moreLinkText: "ច្រើនទៀត",
|
||||
noEventsText: "គ្មានព្រឹត្តិការណ៍ត្រូវបង្ហាញ"
|
||||
};
|
||||
|
||||
return km;
|
||||
})()
|
||||
);
|
|
@ -0,0 +1,24 @@
|
|||
FullCalendar.globalLocales.push(
|
||||
(function() {
|
||||
"use strict";
|
||||
|
||||
var ko = {
|
||||
code: "ko",
|
||||
buttonText: {
|
||||
prev: "이전달",
|
||||
next: "다음달",
|
||||
today: "오늘",
|
||||
month: "월",
|
||||
week: "주",
|
||||
day: "일",
|
||||
list: "일정목록"
|
||||
},
|
||||
weekText: "주",
|
||||
allDayText: "종일",
|
||||
moreLinkText: "개",
|
||||
noEventsText: "일정이 없습니다"
|
||||
};
|
||||
|
||||
return ko;
|
||||
})()
|
||||
);
|
|
@ -0,0 +1,29 @@
|
|||
FullCalendar.globalLocales.push(
|
||||
(function() {
|
||||
"use strict";
|
||||
|
||||
var ku = {
|
||||
code: "ku",
|
||||
week: {
|
||||
dow: 6, // Saturday is the first day of the week.
|
||||
doy: 12 // The week that contains Jan 1st is the first week of the year.
|
||||
},
|
||||
direction: "rtl",
|
||||
buttonText: {
|
||||
prev: "پێشتر",
|
||||
next: "دواتر",
|
||||
today: "ئەمڕو",
|
||||
month: "مانگ",
|
||||
week: "هەفتە",
|
||||
day: "ڕۆژ",
|
||||
list: "بەرنامە"
|
||||
},
|
||||
weekText: "هەفتە",
|
||||
allDayText: "هەموو ڕۆژەکە",
|
||||
moreLinkText: "زیاتر",
|
||||
noEventsText: "هیچ ڕووداوێك نیە"
|
||||
};
|
||||
|
||||
return ku;
|
||||
})()
|
||||
);
|
|
@ -0,0 +1,28 @@
|
|||
FullCalendar.globalLocales.push(
|
||||
(function() {
|
||||
"use strict";
|
||||
|
||||
var lb = {
|
||||
code: "lb",
|
||||
week: {
|
||||
dow: 1, // Monday is the first day of the week.
|
||||
doy: 4 // The week that contains Jan 4th is the first week of the year.
|
||||
},
|
||||
buttonText: {
|
||||
prev: "Zréck",
|
||||
next: "Weider",
|
||||
today: "Haut",
|
||||
month: "Mount",
|
||||
week: "Woch",
|
||||
day: "Dag",
|
||||
list: "Terminiwwersiicht"
|
||||
},
|
||||
weekText: "W",
|
||||
allDayText: "Ganzen Dag",
|
||||
moreLinkText: "méi",
|
||||
noEventsText: "Nee Evenementer ze affichéieren"
|
||||
};
|
||||
|
||||
return lb;
|
||||
})()
|
||||
);
|
|
@ -0,0 +1,28 @@
|
|||
FullCalendar.globalLocales.push(
|
||||
(function() {
|
||||
"use strict";
|
||||
|
||||
var lt = {
|
||||
code: "lt",
|
||||
week: {
|
||||
dow: 1, // Monday is the first day of the week.
|
||||
doy: 4 // The week that contains Jan 4th is the first week of the year.
|
||||
},
|
||||
buttonText: {
|
||||
prev: "Atgal",
|
||||
next: "Pirmyn",
|
||||
today: "Šiandien",
|
||||
month: "Mėnuo",
|
||||
week: "Savaitė",
|
||||
day: "Diena",
|
||||
list: "Darbotvarkė"
|
||||
},
|
||||
weekText: "SAV",
|
||||
allDayText: "Visą dieną",
|
||||
moreLinkText: "daugiau",
|
||||
noEventsText: "Nėra įvykių rodyti"
|
||||
};
|
||||
|
||||
return lt;
|
||||
})()
|
||||
);
|
|
@ -0,0 +1,30 @@
|
|||
FullCalendar.globalLocales.push(
|
||||
(function() {
|
||||
"use strict";
|
||||
|
||||
var lv = {
|
||||
code: "lv",
|
||||
week: {
|
||||
dow: 1, // Monday is the first day of the week.
|
||||
doy: 4 // The week that contains Jan 4th is the first week of the year.
|
||||
},
|
||||
buttonText: {
|
||||
prev: "Iepr.",
|
||||
next: "Nāk.",
|
||||
today: "Šodien",
|
||||
month: "Mēnesis",
|
||||
week: "Nedēļa",
|
||||
day: "Diena",
|
||||
list: "Dienas kārtība"
|
||||
},
|
||||
weekText: "Ned.",
|
||||
allDayText: "Visu dienu",
|
||||
moreLinkText: function(n) {
|
||||
return "+vēl " + n;
|
||||
},
|
||||
noEventsText: "Nav notikumu"
|
||||
};
|
||||
|
||||
return lv;
|
||||
})()
|
||||
);
|
|
@ -0,0 +1,26 @@
|
|||
FullCalendar.globalLocales.push(
|
||||
(function() {
|
||||
"use strict";
|
||||
|
||||
var mk = {
|
||||
code: "mk",
|
||||
buttonText: {
|
||||
prev: "претходно",
|
||||
next: "следно",
|
||||
today: "Денес",
|
||||
month: "Месец",
|
||||
week: "Недела",
|
||||
day: "Ден",
|
||||
list: "График"
|
||||
},
|
||||
weekText: "Сед",
|
||||
allDayText: "Цел ден",
|
||||
moreLinkText: function(n) {
|
||||
return "+повеќе " + n;
|
||||
},
|
||||
noEventsText: "Нема настани за прикажување"
|
||||
};
|
||||
|
||||
return mk;
|
||||
})()
|
||||
);
|
|
@ -0,0 +1,30 @@
|
|||
FullCalendar.globalLocales.push(
|
||||
(function() {
|
||||
"use strict";
|
||||
|
||||
var ms = {
|
||||
code: "ms",
|
||||
week: {
|
||||
dow: 1, // Monday is the first day of the week.
|
||||
doy: 7 // The week that contains Jan 1st is the first week of the year.
|
||||
},
|
||||
buttonText: {
|
||||
prev: "Sebelum",
|
||||
next: "Selepas",
|
||||
today: "hari ini",
|
||||
month: "Bulan",
|
||||
week: "Minggu",
|
||||
day: "Hari",
|
||||
list: "Agenda"
|
||||
},
|
||||
weekText: "Mg",
|
||||
allDayText: "Sepanjang hari",
|
||||
moreLinkText: function(n) {
|
||||
return "masih ada " + n + " acara";
|
||||
},
|
||||
noEventsText: "Tiada peristiwa untuk dipaparkan"
|
||||
};
|
||||
|
||||
return ms;
|
||||
})()
|
||||
);
|
|
@ -0,0 +1,39 @@
|
|||
FullCalendar.globalLocales.push(
|
||||
(function() {
|
||||
"use strict";
|
||||
|
||||
var nb = {
|
||||
code: "nb",
|
||||
week: {
|
||||
dow: 1, // Monday is the first day of the week.
|
||||
doy: 4 // The week that contains Jan 4th is the first week of the year.
|
||||
},
|
||||
buttonText: {
|
||||
prev: "Forrige",
|
||||
next: "Neste",
|
||||
today: "I dag",
|
||||
month: "Måned",
|
||||
week: "Uke",
|
||||
day: "Dag",
|
||||
list: "Agenda"
|
||||
},
|
||||
weekText: "Uke",
|
||||
weekTextLong: "Uke",
|
||||
allDayText: "Hele dagen",
|
||||
moreLinkText: "til",
|
||||
noEventsText: "Ingen hendelser å vise",
|
||||
buttonHints: {
|
||||
prev: "Forrige $0",
|
||||
next: "Neste $0",
|
||||
today: "Nåværende $0"
|
||||
},
|
||||
viewHint: "$0 visning",
|
||||
navLinkHint: "Gå til $0",
|
||||
moreLinkHint(eventCnt) {
|
||||
return `Vis ${eventCnt} flere hendelse${eventCnt === 1 ? "" : "r"}`;
|
||||
}
|
||||
};
|
||||
|
||||
return nb;
|
||||
})()
|
||||
);
|
|
@ -0,0 +1,28 @@
|
|||
FullCalendar.globalLocales.push(
|
||||
(function() {
|
||||
"use strict";
|
||||
|
||||
var ne = {
|
||||
code: "ne", // code for nepal
|
||||
week: {
|
||||
dow: 7, // Sunday is the first day of the week.
|
||||
doy: 1 // The week that contains Jan 1st is the first week of the year.
|
||||
},
|
||||
buttonText: {
|
||||
prev: "अघिल्लो",
|
||||
next: "अर्को",
|
||||
today: "आज",
|
||||
month: "महिना",
|
||||
week: "हप्ता",
|
||||
day: "दिन",
|
||||
list: "सूची"
|
||||
},
|
||||
weekText: "हप्ता",
|
||||
allDayText: "दिनभरि",
|
||||
moreLinkText: "थप लिंक",
|
||||
noEventsText: "देखाउनको लागि कुनै घटनाहरू छैनन्"
|
||||
};
|
||||
|
||||
return ne;
|
||||
})()
|
||||
);
|
|
@ -0,0 +1,28 @@
|
|||
FullCalendar.globalLocales.push(
|
||||
(function() {
|
||||
"use strict";
|
||||
|
||||
var nl = {
|
||||
code: "nl",
|
||||
week: {
|
||||
dow: 1, // Monday is the first day of the week.
|
||||
doy: 4 // The week that contains Jan 4th is the first week of the year.
|
||||
},
|
||||
buttonText: {
|
||||
prev: "Vorige",
|
||||
next: "Volgende",
|
||||
today: "Vandaag",
|
||||
year: "Jaar",
|
||||
month: "Maand",
|
||||
week: "Week",
|
||||
day: "Dag",
|
||||
list: "Agenda"
|
||||
},
|
||||
allDayText: "Hele dag",
|
||||
moreLinkText: "extra",
|
||||
noEventsText: "Geen evenementen om te laten zien"
|
||||
};
|
||||
|
||||
return nl;
|
||||
})()
|
||||
);
|
|
@ -0,0 +1,28 @@
|
|||
FullCalendar.globalLocales.push(
|
||||
(function() {
|
||||
"use strict";
|
||||
|
||||
var nn = {
|
||||
code: "nn",
|
||||
week: {
|
||||
dow: 1, // Monday is the first day of the week.
|
||||
doy: 4 // The week that contains Jan 4th is the first week of the year.
|
||||
},
|
||||
buttonText: {
|
||||
prev: "Førre",
|
||||
next: "Neste",
|
||||
today: "I dag",
|
||||
month: "Månad",
|
||||
week: "Veke",
|
||||
day: "Dag",
|
||||
list: "Agenda"
|
||||
},
|
||||
weekText: "Veke",
|
||||
allDayText: "Heile dagen",
|
||||
moreLinkText: "til",
|
||||
noEventsText: "Ingen hendelser å vise"
|
||||
};
|
||||
|
||||
return nn;
|
||||
})()
|
||||
);
|
|
@ -0,0 +1,28 @@
|
|||
FullCalendar.globalLocales.push(
|
||||
(function() {
|
||||
"use strict";
|
||||
|
||||
var pl = {
|
||||
code: "pl",
|
||||
week: {
|
||||
dow: 1, // Monday is the first day of the week.
|
||||
doy: 4 // The week that contains Jan 4th is the first week of the year.
|
||||
},
|
||||
buttonText: {
|
||||
prev: "Poprzedni",
|
||||
next: "Następny",
|
||||
today: "Dziś",
|
||||
month: "Miesiąc",
|
||||
week: "Tydzień",
|
||||
day: "Dzień",
|
||||
list: "Plan dnia"
|
||||
},
|
||||
weekText: "Tydz",
|
||||
allDayText: "Cały dzień",
|
||||
moreLinkText: "więcej",
|
||||
noEventsText: "Brak wydarzeń do wyświetlenia"
|
||||
};
|
||||
|
||||
return pl;
|
||||
})()
|
||||
);
|
|
@ -0,0 +1,26 @@
|
|||
FullCalendar.globalLocales.push(
|
||||
(function() {
|
||||
"use strict";
|
||||
|
||||
var ptBr = {
|
||||
code: "pt-br",
|
||||
buttonText: {
|
||||
prev: "Anterior",
|
||||
next: "Próximo",
|
||||
today: "Hoje",
|
||||
month: "Mês",
|
||||
week: "Semana",
|
||||
day: "Dia",
|
||||
list: "Lista"
|
||||
},
|
||||
weekText: "Sm",
|
||||
allDayText: "dia inteiro",
|
||||
moreLinkText: function(n) {
|
||||
return "mais +" + n;
|
||||
},
|
||||
noEventsText: "Não há eventos para mostrar"
|
||||
};
|
||||
|
||||
return ptBr;
|
||||
})()
|
||||
);
|
|
@ -0,0 +1,28 @@
|
|||
FullCalendar.globalLocales.push(
|
||||
(function() {
|
||||
"use strict";
|
||||
|
||||
var pt = {
|
||||
code: "pt",
|
||||
week: {
|
||||
dow: 1, // Monday is the first day of the week.
|
||||
doy: 4 // The week that contains Jan 4th is the first week of the year.
|
||||
},
|
||||
buttonText: {
|
||||
prev: "Anterior",
|
||||
next: "Seguinte",
|
||||
today: "Hoje",
|
||||
month: "Mês",
|
||||
week: "Semana",
|
||||
day: "Dia",
|
||||
list: "Agenda"
|
||||
},
|
||||
weekText: "Sem",
|
||||
allDayText: "Todo o dia",
|
||||
moreLinkText: "mais",
|
||||
noEventsText: "Não há eventos para mostrar"
|
||||
};
|
||||
|
||||
return pt;
|
||||
})()
|
||||
);
|
|
@ -0,0 +1,30 @@
|
|||
FullCalendar.globalLocales.push(
|
||||
(function() {
|
||||
"use strict";
|
||||
|
||||
var ro = {
|
||||
code: "ro",
|
||||
week: {
|
||||
dow: 1, // Monday is the first day of the week.
|
||||
doy: 7 // The week that contains Jan 1st is the first week of the year.
|
||||
},
|
||||
buttonText: {
|
||||
prev: "precedentă",
|
||||
next: "următoare",
|
||||
today: "Azi",
|
||||
month: "Lună",
|
||||
week: "Săptămână",
|
||||
day: "Zi",
|
||||
list: "Agendă"
|
||||
},
|
||||
weekText: "Săpt",
|
||||
allDayText: "Toată ziua",
|
||||
moreLinkText: function(n) {
|
||||
return "+alte " + n;
|
||||
},
|
||||
noEventsText: "Nu există evenimente de afișat"
|
||||
};
|
||||
|
||||
return ro;
|
||||
})()
|
||||
);
|
|
@ -0,0 +1,30 @@
|
|||
FullCalendar.globalLocales.push(
|
||||
(function() {
|
||||
"use strict";
|
||||
|
||||
var ru = {
|
||||
code: "ru",
|
||||
week: {
|
||||
dow: 1, // Monday is the first day of the week.
|
||||
doy: 4 // The week that contains Jan 4th is the first week of the year.
|
||||
},
|
||||
buttonText: {
|
||||
prev: "Пред",
|
||||
next: "След",
|
||||
today: "Сегодня",
|
||||
month: "Месяц",
|
||||
week: "Неделя",
|
||||
day: "День",
|
||||
list: "Повестка дня"
|
||||
},
|
||||
weekText: "Нед",
|
||||
allDayText: "Весь день",
|
||||
moreLinkText: function(n) {
|
||||
return "+ ещё " + n;
|
||||
},
|
||||
noEventsText: "Нет событий для отображения"
|
||||
};
|
||||
|
||||
return ru;
|
||||
})()
|
||||
);
|
|
@ -0,0 +1,28 @@
|
|||
FullCalendar.globalLocales.push(
|
||||
(function() {
|
||||
"use strict";
|
||||
|
||||
var siLk = {
|
||||
code: "si-lk",
|
||||
week: {
|
||||
dow: 1, // Monday is the first day of the week.
|
||||
doy: 4 // The week that contains Jan 4th is the first week of the year.
|
||||
},
|
||||
buttonText: {
|
||||
prev: "පෙර",
|
||||
next: "පසු",
|
||||
today: "අද",
|
||||
month: "මාසය",
|
||||
week: "සතිය",
|
||||
day: "දවස",
|
||||
list: "ලැයිස්තුව"
|
||||
},
|
||||
weekText: "සති",
|
||||
allDayText: "සියලු",
|
||||
moreLinkText: "තවත්",
|
||||
noEventsText: "මුකුත් නැත"
|
||||
};
|
||||
|
||||
return siLk;
|
||||
})()
|
||||
);
|
|
@ -0,0 +1,30 @@
|
|||
FullCalendar.globalLocales.push(
|
||||
(function() {
|
||||
"use strict";
|
||||
|
||||
var sk = {
|
||||
code: "sk",
|
||||
week: {
|
||||
dow: 1, // Monday is the first day of the week.
|
||||
doy: 4 // The week that contains Jan 4th is the first week of the year.
|
||||
},
|
||||
buttonText: {
|
||||
prev: "Predchádzajúci",
|
||||
next: "Nasledujúci",
|
||||
today: "Dnes",
|
||||
month: "Mesiac",
|
||||
week: "Týždeň",
|
||||
day: "Deň",
|
||||
list: "Rozvrh"
|
||||
},
|
||||
weekText: "Ty",
|
||||
allDayText: "Celý deň",
|
||||
moreLinkText: function(n) {
|
||||
return "+ďalšie: " + n;
|
||||
},
|
||||
noEventsText: "Žiadne akcie na zobrazenie"
|
||||
};
|
||||
|
||||
return sk;
|
||||
})()
|
||||
);
|
|
@ -0,0 +1,28 @@
|
|||
FullCalendar.globalLocales.push(
|
||||
(function() {
|
||||
"use strict";
|
||||
|
||||
var sl = {
|
||||
code: "sl",
|
||||
week: {
|
||||
dow: 1, // Monday is the first day of the week.
|
||||
doy: 7 // The week that contains Jan 1st is the first week of the year.
|
||||
},
|
||||
buttonText: {
|
||||
prev: "Prejšnji",
|
||||
next: "Naslednji",
|
||||
today: "Trenutni",
|
||||
month: "Mesec",
|
||||
week: "Teden",
|
||||
day: "Dan",
|
||||
list: "Dnevni red"
|
||||
},
|
||||
weekText: "Teden",
|
||||
allDayText: "Ves dan",
|
||||
moreLinkText: "več",
|
||||
noEventsText: "Ni dogodkov za prikaz"
|
||||
};
|
||||
|
||||
return sl;
|
||||
})()
|
||||
);
|
|
@ -0,0 +1,24 @@
|
|||
FullCalendar.globalLocales.push(
|
||||
(function() {
|
||||
"use strict";
|
||||
|
||||
var sm = {
|
||||
code: "sm",
|
||||
buttonText: {
|
||||
prev: "Talu ai",
|
||||
next: "Mulimuli atu",
|
||||
today: "Aso nei",
|
||||
month: "Masina",
|
||||
week: "Vaiaso",
|
||||
day: "Aso",
|
||||
list: "Faasologa"
|
||||
},
|
||||
weekText: "Vaiaso",
|
||||
allDayText: "Aso atoa",
|
||||
moreLinkText: "sili atu",
|
||||
noEventsText: "Leai ni mea na tutupu"
|
||||
};
|
||||
|
||||
return sm;
|
||||
})()
|
||||
);
|
|
@ -0,0 +1,30 @@
|
|||
FullCalendar.globalLocales.push(
|
||||
(function() {
|
||||
"use strict";
|
||||
|
||||
var sq = {
|
||||
code: "sq",
|
||||
week: {
|
||||
dow: 1, // Monday is the first day of the week.
|
||||
doy: 4 // The week that contains Jan 4th is the first week of the year.
|
||||
},
|
||||
buttonText: {
|
||||
prev: "mbrapa",
|
||||
next: "Përpara",
|
||||
today: "sot",
|
||||
month: "Muaj",
|
||||
week: "Javë",
|
||||
day: "Ditë",
|
||||
list: "Listë"
|
||||
},
|
||||
weekText: "Ja",
|
||||
allDayText: "Gjithë ditën",
|
||||
moreLinkText: function(n) {
|
||||
return "+më tepër " + n;
|
||||
},
|
||||
noEventsText: "Nuk ka evente për të shfaqur"
|
||||
};
|
||||
|
||||
return sq;
|
||||
})()
|
||||
);
|
|
@ -0,0 +1,30 @@
|
|||
FullCalendar.globalLocales.push(
|
||||
(function() {
|
||||
"use strict";
|
||||
|
||||
var srCyrl = {
|
||||
code: "sr-cyrl",
|
||||
week: {
|
||||
dow: 1, // Monday is the first day of the week.
|
||||
doy: 7 // The week that contains Jan 1st is the first week of the year.
|
||||
},
|
||||
buttonText: {
|
||||
prev: "Претходна",
|
||||
next: "следећи",
|
||||
today: "Данас",
|
||||
month: "Месец",
|
||||
week: "Недеља",
|
||||
day: "Дан",
|
||||
list: "Планер"
|
||||
},
|
||||
weekText: "Сед",
|
||||
allDayText: "Цео дан",
|
||||
moreLinkText: function(n) {
|
||||
return "+ још " + n;
|
||||
},
|
||||
noEventsText: "Нема догађаја за приказ"
|
||||
};
|
||||
|
||||
return srCyrl;
|
||||
})()
|
||||
);
|
|
@ -0,0 +1,30 @@
|
|||
FullCalendar.globalLocales.push(
|
||||
(function() {
|
||||
"use strict";
|
||||
|
||||
var sr = {
|
||||
code: "sr",
|
||||
week: {
|
||||
dow: 1, // Monday is the first day of the week.
|
||||
doy: 7 // The week that contains Jan 1st is the first week of the year.
|
||||
},
|
||||
buttonText: {
|
||||
prev: "Prethodna",
|
||||
next: "Sledeći",
|
||||
today: "Danas",
|
||||
month: "Mеsеc",
|
||||
week: "Nеdеlja",
|
||||
day: "Dan",
|
||||
list: "Planеr"
|
||||
},
|
||||
weekText: "Sed",
|
||||
allDayText: "Cеo dan",
|
||||
moreLinkText: function(n) {
|
||||
return "+ još " + n;
|
||||
},
|
||||
noEventsText: "Nеma događaja za prikaz"
|
||||
};
|
||||
|
||||
return sr;
|
||||
})()
|
||||
);
|
|
@ -0,0 +1,54 @@
|
|||
FullCalendar.globalLocales.push(
|
||||
(function() {
|
||||
"use strict";
|
||||
|
||||
var sv = {
|
||||
code: "sv",
|
||||
week: {
|
||||
dow: 1, // Monday is the first day of the week.
|
||||
doy: 4 // The week that contains Jan 4th is the first week of the year.
|
||||
},
|
||||
buttonText: {
|
||||
prev: "Förra",
|
||||
next: "Nästa",
|
||||
today: "Idag",
|
||||
month: "Månad",
|
||||
week: "Vecka",
|
||||
day: "Dag",
|
||||
list: "Program"
|
||||
},
|
||||
buttonHints: {
|
||||
prev(buttonText) {
|
||||
return `Föregående ${buttonText.toLocaleLowerCase()}`;
|
||||
},
|
||||
next(buttonText) {
|
||||
return `Nästa ${buttonText.toLocaleLowerCase()}`;
|
||||
},
|
||||
today(buttonText) {
|
||||
return (
|
||||
(buttonText === "Program" ? "Detta" : "Denna") +
|
||||
" " +
|
||||
buttonText.toLocaleLowerCase()
|
||||
);
|
||||
}
|
||||
},
|
||||
viewHint: "$0 vy",
|
||||
navLinkHint: "Gå till $0",
|
||||
moreLinkHint(eventCnt) {
|
||||
return `Visa ytterligare ${eventCnt} händelse${
|
||||
eventCnt === 1 ? "" : "r"
|
||||
}`;
|
||||
},
|
||||
weekText: "v.",
|
||||
weekTextLong: "Vecka",
|
||||
allDayText: "Heldag",
|
||||
moreLinkText: "till",
|
||||
noEventsText: "Inga händelser att visa",
|
||||
closeHint: "Stäng",
|
||||
timeHint: "Klockan",
|
||||
eventHint: "Händelse"
|
||||
};
|
||||
|
||||
return sv;
|
||||
})()
|
||||
);
|
|
@ -0,0 +1,30 @@
|
|||
FullCalendar.globalLocales.push(
|
||||
(function() {
|
||||
"use strict";
|
||||
|
||||
var taIn = {
|
||||
code: "ta-in",
|
||||
week: {
|
||||
dow: 1, // Monday is the first day of the week.
|
||||
doy: 4 // The week that contains Jan 4th is the first week of the year.
|
||||
},
|
||||
buttonText: {
|
||||
prev: "முந்தைய",
|
||||
next: "அடுத்தது",
|
||||
today: "இன்று",
|
||||
month: "மாதம்",
|
||||
week: "வாரம்",
|
||||
day: "நாள்",
|
||||
list: "தினசரி அட்டவணை"
|
||||
},
|
||||
weekText: "வாரம்",
|
||||
allDayText: "நாள் முழுவதும்",
|
||||
moreLinkText: function(n) {
|
||||
return "+ மேலும் " + n;
|
||||
},
|
||||
noEventsText: "காண்பிக்க நிகழ்வுகள் இல்லை"
|
||||
};
|
||||
|
||||
return taIn;
|
||||
})()
|
||||
);
|
|
@ -0,0 +1,31 @@
|
|||
FullCalendar.globalLocales.push(
|
||||
(function() {
|
||||
"use strict";
|
||||
|
||||
var th = {
|
||||
code: "th",
|
||||
week: {
|
||||
dow: 1, // Monday is the first day of the week.
|
||||
doy: 4 // The week that contains Jan 4th is the first week of the year.
|
||||
},
|
||||
buttonText: {
|
||||
prev: "ก่อนหน้า",
|
||||
next: "ถัดไป",
|
||||
prevYear: "ปีก่อนหน้า",
|
||||
nextYear: "ปีถัดไป",
|
||||
year: "ปี",
|
||||
today: "วันนี้",
|
||||
month: "เดือน",
|
||||
week: "สัปดาห์",
|
||||
day: "วัน",
|
||||
list: "กำหนดการ"
|
||||
},
|
||||
weekText: "สัปดาห์",
|
||||
allDayText: "ตลอดวัน",
|
||||
moreLinkText: "เพิ่มเติม",
|
||||
noEventsText: "ไม่มีกิจกรรมที่จะแสดง"
|
||||
};
|
||||
|
||||
return th;
|
||||
})()
|
||||
);
|
|
@ -0,0 +1,28 @@
|
|||
FullCalendar.globalLocales.push(
|
||||
(function() {
|
||||
"use strict";
|
||||
|
||||
var tr = {
|
||||
code: "tr",
|
||||
week: {
|
||||
dow: 1, // Monday is the first day of the week.
|
||||
doy: 7 // The week that contains Jan 1st is the first week of the year.
|
||||
},
|
||||
buttonText: {
|
||||
prev: "geri",
|
||||
next: "ileri",
|
||||
today: "bugün",
|
||||
month: "Ay",
|
||||
week: "Hafta",
|
||||
day: "Gün",
|
||||
list: "Ajanda"
|
||||
},
|
||||
weekText: "Hf",
|
||||
allDayText: "Tüm gün",
|
||||
moreLinkText: "daha fazla",
|
||||
noEventsText: "Gösterilecek etkinlik yok"
|
||||
};
|
||||
|
||||
return tr;
|
||||
})()
|
||||
);
|
|
@ -0,0 +1,18 @@
|
|||
FullCalendar.globalLocales.push(
|
||||
(function() {
|
||||
"use strict";
|
||||
|
||||
var ug = {
|
||||
code: "ug",
|
||||
buttonText: {
|
||||
month: "ئاي",
|
||||
week: "ھەپتە",
|
||||
day: "كۈن",
|
||||
list: "كۈنتەرتىپ"
|
||||
},
|
||||
allDayText: "پۈتۈن كۈن"
|
||||
};
|
||||
|
||||
return ug;
|
||||
})()
|
||||
);
|
|
@ -0,0 +1,30 @@
|
|||
FullCalendar.globalLocales.push(
|
||||
(function() {
|
||||
"use strict";
|
||||
|
||||
var uk = {
|
||||
code: "uk",
|
||||
week: {
|
||||
dow: 1, // Monday is the first day of the week.
|
||||
doy: 7 // The week that contains Jan 1st is the first week of the year.
|
||||
},
|
||||
buttonText: {
|
||||
prev: "Попередній",
|
||||
next: "далі",
|
||||
today: "Сьогодні",
|
||||
month: "Місяць",
|
||||
week: "Тиждень",
|
||||
day: "День",
|
||||
list: "Порядок денний"
|
||||
},
|
||||
weekText: "Тиж",
|
||||
allDayText: "Увесь день",
|
||||
moreLinkText: function(n) {
|
||||
return "+ще " + n + "...";
|
||||
},
|
||||
noEventsText: "Немає подій для відображення"
|
||||
};
|
||||
|
||||
return uk;
|
||||
})()
|
||||
);
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue