Cacti: 1.0.0 - Weathermap doesnt work

Created on 1 Feb 2017  路  8Comments  路  Source: Cacti/cacti

hello,

weathermap plugin doesnt work, it would appear there are some functions missing.

2017-02-01 15:28:53 - ERROR PHP ERROR in Plugin 'weathermap': Uncaught Error: Call to undefined function html_graph_start_box() in /usr/share/cacti/plugins/weathermap/weathermap-cacti-plugin.php:426
Stack trace:

0 /usr/share/cacti/plugins/weathermap/weathermap-cacti-plugin.php(292): weathermap_thumbview(-1)

1 {main}

thrown in file: /usr/share/cacti/plugins/weathermap/weathermap-cacti-plugin.php on line: 426

All 8 comments

i found the issue to be just these missing functions in /lib/html.php

workaround: add the missing functions in lib/html.php at start, before function html_start_box

function html_graph_start_box($cellpadding = 3, $leading_br = true) {
        if ($leading_br == true) {
                print "<br>\n";
        }

        print "<table width='100%' style='background-color: #f5f5f5; border: 1px solid #bbbbbb;' align='center' cellpadding='$cellpadding'>\n";
}

/* html_graph_end_box - draws the end of an HTML graph view box */
function html_graph_end_box() {
        print "</table>";
}

seems to work ...

@imax64 I have plugin 0.98a with my change. This pugin work on Cacti 1.0.0 and have new api, but I not a programmer and my change plugin have some mistake.
If you want-you can install my change plugin and use:
weathermap.zip

Please open a ticket with Howie. He knows about the Cacti 1.0.0 release. He should be able to help you.

pardon the noob question... how do i open a ticket with howie?

I had a brief discussion with TheWitness about this a while ago, and there wasn't any documentation for the completely changed plugin system (now all AJAX, new hooks). Based on that, I decided I'd prioritise other things - PHP 7/PDO support (basically done), and then a standalone map management app, so that users of tools other than Cacti benefit too. If it is going to require a rewrite anyway, I might as well make it more inclusive.

I have provided Howie a patch for the near term in the link above.

thanks

Was this page helpful?
0 / 5 - 0 ratings