Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions .github/workflows/plugin-ci-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -172,14 +172,14 @@ jobs:
cd ${{ github.workspace }}/cacti
sudo php cli/plugin_manage.php --plugin=thold --install --enable

- name: import Thold Plugin Sample Data
run: |
cd ${{ github.workspace }}/cacti/plugins/thold
sudo php cli_import.php --filename=.github/workflows/thold_sample_data.xml
if [ $? -ne 0 ]; then
echo "Failed to import Thold sample data"
exit 1
fi
# - name: import Thold Plugin Sample Data
# run: |
# cd ${{ github.workspace }}/cacti/plugins/thold
# sudo php cli_import.php --filename=.github/workflows/thold_sample_data.xml
# if [ $? -ne 0 ]; then
# echo "Failed to import Thold sample data"
# exit 1
# fi

- name: Check PHP Syntax for Plugin
run: |
Expand Down
5 changes: 3 additions & 2 deletions includes/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,7 @@ function thold_config_arrays() {
}

$device_change_fields['match_field'][] = 'thold_send_email';
$device_change_fields['match_field'][] = 'thold_host_email';
$device_change_fields['match_field'][] = 'thold_failure_count';

$realm_array = array(
Expand Down Expand Up @@ -335,7 +336,7 @@ function thold_config_form() {
'2' => __('List Below', 'thold'),
'3' => __('Global and List Below', 'thold')
),
'description' => __('Which Notification List(s) of should be notified about Device Up/Down events?', 'thold'),
'description' => __('Which Type of Notification List(s) should be used for Device Up/Down events?', 'thold'),
'value' => '|arg1:thold_send_email|',
'on_change' => 'changeNotify()',
'default' => '1',
Expand All @@ -344,7 +345,7 @@ function thold_config_form() {

$fields_host_edit3['thold_host_email'] = array(
'friendly_name' => __('Notification List', 'thold'),
'description' => __('Additional Email address, separated by commas for multiple Emails.', 'thold'),
'description' => __('Which Notification List(s) of should be notified about Device Up/Down events?', 'thold'),
'method' => 'drop_sql',
'sql' => 'SELECT id,name FROM plugin_notification_lists ORDER BY name',
'value' => '|arg1:thold_host_email|',
Expand Down
1 change: 1 addition & 0 deletions setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ function plugin_thold_install($upgrade = false) {
api_plugin_register_hook($plugin, 'host_edit_bottom', 'thold_host_edit_bottom', 'setup.php');
api_plugin_register_hook($plugin, 'device_threshold_autocreate', 'thold_device_autocreate', 'setup.php');
api_plugin_register_hook($plugin, 'device_template_change', 'thold_device_template_change', 'setup.php');
api_plugin_register_hook($plugin, 'device_change_javascript', 'thold_host_edit_bottom', 'setup.php');

// Automation Hooks
api_plugin_register_hook($plugin, 'create_complete_graph_from_template', 'thold_create_graph_thold', 'setup.php');
Expand Down