Dashboard Plugin

General discussion about Plugins for Cacti

Moderators: Developers, Moderators

Post Reply
User avatar
zoemu
Cacti User
Posts: 287
Joined: Fri Jul 10, 2009 1:38 pm
Location: Toronto, Canada

Dashboard Plugin

Post by zoemu »

I'm trying to install DashBoard plugin but it is looking for two files not included in the plugin.

Code: Select all

top_dashboard.php
    include "mysqlconecta.php"; 
    include "mysqlexecuta.php"; 
Does anyone knows about this files or can you please put me in contact with the developer ?

Thanks
User avatar
zoemu
Cacti User
Posts: 287
Joined: Fri Jul 10, 2009 1:38 pm
Location: Toronto, Canada

Re: Dashboard Plugin

Post by zoemu »

Anyone !??????
User avatar
zoemu
Cacti User
Posts: 287
Joined: Fri Jul 10, 2009 1:38 pm
Location: Toronto, Canada

Re: Dashboard Plugin

Post by zoemu »

anyone still !!!!!!!!!
victorantunes
Cacti User
Posts: 111
Joined: Fri Sep 28, 2012 6:52 pm

Re: Dashboard Plugin

Post by victorantunes »

Please refer to the official Dashboard plugin page on the Cacti docs website

http://docs.cacti.net/userplugin:dashboard
cigamit
Developer
Posts: 3369
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Re: Dashboard Plugin

Post by cigamit »

I commented those lines out and it works fine without them. Also, down on ~line 129. You will want to replace the $start and $end lines with.
$start=(isset($_POST['date1']) ? $_POST['date1'] : date("Y-m-d H:i", time()-86400));;
$end=(isset($_POST['date2']) ? $_POST['date2'] : date("Y-m-d H:i", time()));
to get rid of the errors.
User avatar
zoemu
Cacti User
Posts: 287
Joined: Fri Jul 10, 2009 1:38 pm
Location: Toronto, Canada

Re: Dashboard Plugin

Post by zoemu »

THANKS, that got rid of quiet bit off errors , but now i'm getting errors on dashboard_edit.php

Code: Select all

Notice: Undefined variable: action in C:\cacti\plugins\dashboard\dashboard_edit.php on line 37

Notice: Undefined variable: action in C:\cacti\plugins\dashboard\dashboard_edit.php on line 54
PHP Notice: Undefined index: dashboard_edit.php: in C:\cacti\lib\functions.php on line 1830 PHP Notice: Undefined index: dashboard_edit.php: in C:\cacti\lib\functions.php on line 1830 PHP Notice: Undefined variable: action in C:\cacti\plugins\dashboard\dashboard_edit.php on line 37 PHP Notice: Undefined variable: action in C:\cacti\plugins\dashboard\dashboard_edit.php on line 54 .
Any insight please ???
User avatar
zoemu
Cacti User
Posts: 287
Joined: Fri Jul 10, 2009 1:38 pm
Location: Toronto, Canada

Re: Dashboard Plugin

Post by zoemu »

zoemu wrote:THANKS, that got rid of quiet bit off errors , but now i'm getting errors on dashboard_edit.php

Code: Select all

Notice: Undefined variable: action in C:\cacti\plugins\dashboard\dashboard_edit.php on line 37

Notice: Undefined variable: action in C:\cacti\plugins\dashboard\dashboard_edit.php on line 54
PHP Notice: Undefined index: dashboard_edit.php: in C:\cacti\lib\functions.php on line 1830 PHP Notice: Undefined index: dashboard_edit.php: in C:\cacti\lib\functions.php on line 1830 PHP Notice: Undefined variable: action in C:\cacti\plugins\dashboard\dashboard_edit.php on line 37 PHP Notice: Undefined variable: action in C:\cacti\plugins\dashboard\dashboard_edit.php on line 54 .
Any insight please ???
I fixed the errors above , I added an else statement for when the 'action' variable is null or empty!

but, now i'm getting

Code: Select all

Notice: Undefined index: dashboard_edit.php:edit_dash in C:\cacti\lib\functions.php on line 1830
and also, shoudn't the graph list display the grpah name instead of whatever is displayinmg now ?? look at the attached file, you cannot make up which file name is which

thanks again
Attachments
selection.png
selection.png (237.71 KiB) Viewed 7653 times
User avatar
zoemu
Cacti User
Posts: 287
Joined: Fri Jul 10, 2009 1:38 pm
Location: Toronto, Canada

Re: Dashboard Plugin

Post by zoemu »

zoemu wrote:
zoemu wrote:THANKS, that got rid of quiet bit off errors , but now i'm getting errors on dashboard_edit.php

Code: Select all

Notice: Undefined variable: action in C:\cacti\plugins\dashboard\dashboard_edit.php on line 37

Notice: Undefined variable: action in C:\cacti\plugins\dashboard\dashboard_edit.php on line 54
PHP Notice: Undefined index: dashboard_edit.php: in C:\cacti\lib\functions.php on line 1830 PHP Notice: Undefined index: dashboard_edit.php: in C:\cacti\lib\functions.php on line 1830 PHP Notice: Undefined variable: action in C:\cacti\plugins\dashboard\dashboard_edit.php on line 37 PHP Notice: Undefined variable: action in C:\cacti\plugins\dashboard\dashboard_edit.php on line 54 .
Any insight please ???
I fixed the errors above , I added an else statement for when the 'action' variable is null or empty!

but, now i'm getting

Code: Select all

Notice: Undefined index: dashboard_edit.php:edit_dash in C:\cacti\lib\functions.php on line 1830
and also, shoudn't the graph list display the grpah name instead of whatever is displayinmg now ?? look at the attached file, you cannot make up which file name is which

thanks again

I have fixed the problem with the drop down menu, on dashboard_edit.php i've added g.title_cache to the query on line 69

$SQL = "select g.local_graph_id, g.title_cache g.title from graph_templates_graph g order by g.title";

and then on line 77 printf("<option value='%d'>%s</option>", $tr['local_graph_id'], htmlspecialchars($tr['title']));

change htmlspecialchars(['title'] to htmlspecialchars($tr['title_cache']));
Last edited by zoemu on Tue Oct 30, 2012 11:52 am, edited 1 time in total.
User avatar
zoemu
Cacti User
Posts: 287
Joined: Fri Jul 10, 2009 1:38 pm
Location: Toronto, Canada

Re: Dashboard Plugin

Post by zoemu »

still getting a warning

Notice: Undefined index: dashboard_edit.php:edit_dash in C:\cacti\lib\functions.php on line 1830
cigamit
Developer
Posts: 3369
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Re: Dashboard Plugin

Post by cigamit »

in setup.php in the function dashboard_draw_navigation_text
add these lines

Code: Select all

    $nav["dashboard_edit.php:"] = array
    (
        "title" => "Dashboard Edit",
        "mapping" => "index.php:",
        "url" => "dashboard_exit.php",
        "level" => "1"
    );

    $nav["dashboard_edit.php:edit_dash"] = array
    (
        "title" => "Dashboard Edit",
        "mapping" => "index.php:",
        "url" => "dashboard_exit.php",
        "level" => "1"
    );
You should probably also email the original author and let him know of all the bugs / fixes.
cigamit
Developer
Posts: 3369
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Re: Dashboard Plugin

Post by cigamit »

Also, I changed the SQL query you posted to this

Code: Select all

        $SQL = "select g.local_graph_id, g.title, g.title_cache from graph_templates_graph g WHERE g.title_cache != '' order by g.title_cache";
It removes all those blank entries and sorts them properly in the list.
User avatar
zoemu
Cacti User
Posts: 287
Joined: Fri Jul 10, 2009 1:38 pm
Location: Toronto, Canada

Re: Dashboard Plugin

Post by zoemu »

Thanks..

Email sent to the Author!
User avatar
zoemu
Cacti User
Posts: 287
Joined: Fri Jul 10, 2009 1:38 pm
Location: Toronto, Canada

Re: Dashboard Plugin

Post by zoemu »

cigamit wrote:Also, I changed the SQL query you posted to this

Code: Select all

        $SQL = "select g.local_graph_id, g.title, g.title_cache from graph_templates_graph g WHERE g.title_cache != '' order by g.title_cache";
It removes all those blank entries and sorts them properly in the list.

haha I've jus did that, I was tweaking the query to almost the same....it works great now! thanks man
ikorzha758
Cacti User
Posts: 164
Joined: Thu Jan 21, 2010 8:41 pm

Re: Dashboard Plugin

Post by ikorzha758 »

Attached is a dashboard plugin with most of the bugs fixed.... But not all...
Attachments
dashboard.zip
Fixed Dashboard 1.2 plugin
(57.83 KiB) Downloaded 356 times
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests