Source
// Find the row that contains trigger description and select the column that holds the value of description field.
<?php
/*
** Zabbix
** Copyright (C) 2001-2022 Zabbix SIA
**
** 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; either version 2 of the License, or
** (at your option) any later version.
**
** 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.
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
**/
require_once dirname(__FILE__).'/../include/CWebTest.php';
class testPageTriggerDescription extends CWebTest {
public static function getTriggerDescription() {
return [
// Trigger without description.
[
[
'Trigger name' => '1_trigger_Disaster',
'event_url' => 'tr_events.php?triggerid=100036&eventid=9004'
]
],
// Trigger with plain text in the description.
[
[
'Trigger name' => '1_trigger_High',
'description' => 'Non-clickable description',
'event_url' => 'tr_events.php?triggerid=100035&eventid=9003'
]
],
// Trigger with only 1 url in description.
[
[
'Trigger name' => '1_trigger_Average',
'description' => 'https://zabbix.com',
'event_url' => 'tr_events.php?triggerid=100034&eventid=9002'
]
],
// Trigger with text and url in description.
[
[
'Trigger name' => '1_trigger_Warning',
'description' => 'The following url should be clickable: https://zabbix.com',
'event_url' => 'tr_events.php?triggerid=100033&eventid=9001'
]
],
// Trigger with multiple urls in description.
[
[
'Trigger name' => '2_trigger_Information',
'description' => 'http://zabbix.com https://www.zabbix.com/career https://www.zabbix.com/contact',
'event_url' => 'tr_events.php?triggerid=100037&eventid=9005'