]>
Commit | Line | Data |
---|---|---|
a60f27b1 JS |
1 | --- cacti-0.8.7g/graph_view.php 2010-07-09 18:33:46.000000000 -0400 |
2 | +++ cacti-0.8.7g-patched/graph_view.php 2010-07-27 21:30:31.000000000 -0400 | |
3 | @@ -204,7 +204,7 @@ | |
4 | $sql_where = ""; | |
5 | $sql_join = ""; | |
6 | } | |
7 | - /* the user select a bunch of graphs of the 'list' view and wants them dsplayed here */ | |
8 | + /* the user select a bunch of graphs of the 'list' view and wants them displayed here */ | |
9 | if (isset($_REQUEST["style"])) { | |
10 | if (get_request_var_request("style") == "selective") { | |
11 | ||
12 | @@ -296,8 +296,9 @@ | |
13 | $sql_where = get_graph_permissions_sql($current_user["policy_graphs"], $current_user["policy_hosts"], $current_user["policy_graph_templates"]); | |
14 | ||
15 | $hosts = db_fetch_assoc("SELECT DISTINCT host.id, host.description as name | |
16 | - FROM (graph_templates_graph,graph_local) | |
17 | - LEFT JOIN host ON (host.id=graph_local.host_id) | |
18 | + FROM host | |
19 | + LEFT JOIN graph_local ON ( host.id = graph_local.host_id ) | |
20 | + LEFT JOIN graph_templates_graph ON ( graph_templates_graph.local_graph_id = graph_local.id ) | |
21 | LEFT JOIN graph_templates ON (graph_templates.id=graph_local.graph_template_id) | |
22 | LEFT JOIN user_auth_perms ON ((graph_templates_graph.local_graph_id=user_auth_perms.item_id and user_auth_perms.type=1 and user_auth_perms.user_id=" . $_SESSION["sess_user_id"] . ") OR (host.id=user_auth_perms.item_id and user_auth_perms.type=3 and user_auth_perms.user_id=" . $_SESSION["sess_user_id"] . ") OR (graph_templates.id=user_auth_perms.item_id and user_auth_perms.type=4 and user_auth_perms.user_id=" . $_SESSION["sess_user_id"] . ")) | |
23 | WHERE graph_templates_graph.local_graph_id=graph_local.id | |
24 | @@ -327,8 +328,9 @@ | |
25 | <?php | |
26 | if (read_config_option("auth_method") != 0) { | |
27 | $graph_templates = db_fetch_assoc("SELECT DISTINCT graph_templates.* | |
28 | - FROM (graph_templates_graph,graph_local) | |
29 | - LEFT JOIN host ON (host.id=graph_local.host_id) | |
30 | + FROM host | |
31 | + LEFT JOIN graph_local ON ( host.id = graph_local.host_id ) | |
32 | + LEFT JOIN graph_templates_graph ON ( graph_templates_graph.local_graph_id = graph_local.id ) | |
33 | LEFT JOIN graph_templates ON (graph_templates.id=graph_local.graph_template_id) | |
34 | LEFT JOIN user_auth_perms ON ((graph_templates_graph.local_graph_id=user_auth_perms.item_id and user_auth_perms.type=1 and user_auth_perms.user_id=" . $_SESSION["sess_user_id"] . ") OR (host.id=user_auth_perms.item_id and user_auth_perms.type=3 and user_auth_perms.user_id=" . $_SESSION["sess_user_id"] . ") OR (graph_templates.id=user_auth_perms.item_id and user_auth_perms.type=4 and user_auth_perms.user_id=" . $_SESSION["sess_user_id"] . ")) | |
35 | WHERE graph_templates_graph.local_graph_id=graph_local.id | |
36 | @@ -514,10 +516,10 @@ | |
37 | }else{ | |
38 | /* if any of the settings changed, reset the page number */ | |
39 | $changed = false; | |
40 | - $changed += check_changed("host_id", "sess_graphs_view_list_host"); | |
41 | - $changed += check_changed("rows", "sess_graphs_view_list_rows"); | |
42 | - $changed += check_changed("graph_template_id", "sess_graphs_view_list_graph_template"); | |
43 | - $changed += check_changed("filter", "sess_graphs_view_list_filter"); | |
44 | + $changed += check_changed("host_id", "sess_graph_view_list_host"); | |
45 | + $changed += check_changed("rows", "sess_graph_view_list_rows"); | |
46 | + $changed += check_changed("graph_template_id", "sess_graph_view_list_graph_template"); | |
47 | + $changed += check_changed("filter", "sess_graph_view_list_filter"); | |
48 | if ($changed) $_REQUEST["page"] = 1; | |
49 | } | |
50 | ||
51 | @@ -563,7 +565,7 @@ | |
52 | ?> | |
53 | <tr bgcolor="#<?php print $colors["panel"];?>"> | |
54 | <td> | |
55 | - <form style="margin:0px;padding:0px;" name="form_graph_list" method="POST" onSubmit='form_graph(document.chk,document.form_graph_list)' action="graph_view.php"> | |
56 | + <form style="margin:0px;padding:0px;" name="form_graph_list" method="POST" onSubmit='form_graph(document.chk,document.form_graph_list)'> | |
57 | <table width="100%" cellpadding="0" cellspacing="0"> | |
58 | <tr> | |
59 | <td nowrap style='white-space: nowrap;' width="40"> | |
60 | @@ -578,8 +580,9 @@ | |
61 | $sql_where = get_graph_permissions_sql($current_user["policy_graphs"], $current_user["policy_hosts"], $current_user["policy_graph_templates"]); | |
62 | ||
63 | $hosts = db_fetch_assoc("SELECT DISTINCT host.id, host.description as name | |
64 | - FROM (graph_templates_graph,graph_local) | |
65 | - LEFT JOIN host ON (host.id=graph_local.host_id) | |
66 | + FROM host | |
67 | + LEFT JOIN graph_local ON ( host.id = graph_local.host_id ) | |
68 | + LEFT JOIN graph_templates_graph ON ( graph_templates_graph.local_graph_id = graph_local.id ) | |
69 | LEFT JOIN graph_templates ON (graph_templates.id=graph_local.graph_template_id) | |
70 | LEFT JOIN user_auth_perms ON ((graph_templates_graph.local_graph_id=user_auth_perms.item_id and user_auth_perms.type=1 and user_auth_perms.user_id=" . $_SESSION["sess_user_id"] . ") OR (host.id=user_auth_perms.item_id and user_auth_perms.type=3 and user_auth_perms.user_id=" . $_SESSION["sess_user_id"] . ") OR (graph_templates.id=user_auth_perms.item_id and user_auth_perms.type=4 and user_auth_perms.user_id=" . $_SESSION["sess_user_id"] . ")) | |
71 | WHERE graph_templates_graph.local_graph_id=graph_local.id | |
72 | @@ -608,8 +611,9 @@ | |
73 | <?php | |
74 | if (read_config_option("auth_method") != 0) { | |
75 | $graph_templates = db_fetch_assoc("SELECT DISTINCT graph_templates.* | |
76 | - FROM (graph_templates_graph,graph_local) | |
77 | - LEFT JOIN host ON (host.id=graph_local.host_id) | |
78 | + FROM host | |
79 | + LEFT JOIN graph_local ON ( host.id = graph_local.host_id ) | |
80 | + LEFT JOIN graph_templates_graph ON ( graph_templates_graph.local_graph_id = graph_local.id ) | |
81 | LEFT JOIN graph_templates ON (graph_templates.id=graph_local.graph_template_id) | |
82 | LEFT JOIN user_auth_perms ON ((graph_templates_graph.local_graph_id=user_auth_perms.item_id and user_auth_perms.type=1 and user_auth_perms.user_id=" . $_SESSION["sess_user_id"] . ") OR (host.id=user_auth_perms.item_id and user_auth_perms.type=3 and user_auth_perms.user_id=" . $_SESSION["sess_user_id"] . ") OR (graph_templates.id=user_auth_perms.item_id and user_auth_perms.type=4 and user_auth_perms.user_id=" . $_SESSION["sess_user_id"] . ")) | |
83 | WHERE graph_templates_graph.local_graph_id=graph_local.id | |
84 | @@ -736,13 +740,13 @@ | |
85 | ||
86 | html_start_box("", "100%", $colors["header"], "1", "center", ""); | |
87 | print $nav; | |
88 | - html_header_checkbox(array("Graph Title", "Graph Size")); | |
89 | + html_header_checkbox(array("Graph Title", "Graph Size"), false); | |
90 | ||
91 | $i = 0; | |
92 | if (sizeof($graphs)) { | |
93 | foreach ($graphs as $graph) { | |
94 | form_alternate_row_color($colors["alternate"], $colors["light"], $i, 'line' . $graph["local_graph_id"]); $i++; | |
95 | - form_selectable_cell("<strong><a href='" . htmlspecialchars("graph.php?local_graph_id=" . $graph["local_graph_id"] . "&rra_id=all") . "'>" . htmlspecialchars($graph["title_cache"]) . "</a><strong>", $graph["local_graph_id"]); | |
96 | + form_selectable_cell("<strong><a href='" . htmlspecialchars("graph.php?local_graph_id=" . $graph["local_graph_id"] . "&rra_id=all") . "'>" . htmlspecialchars($graph["title_cache"]) . "</a></strong>", $graph["local_graph_id"]); | |
97 | form_selectable_cell($graph["height"] . "x" . $graph["width"], $graph["local_graph_id"]); | |
98 | form_checkbox_cell($graph["title_cache"], $graph["local_graph_id"]); | |
99 | form_end_row(); | |
100 | @@ -795,8 +799,8 @@ | |
101 | strDel = strDel.substring(0,strDel.length - 1); | |
102 | strURL = '&graph_add=' + strAdd + '&graph_remove=' + strDel; | |
103 | return strNavURL + strURL; | |
104 | - alert(strAdd); | |
105 | - alert(strDel); | |
106 | + //alert(strAdd); | |
107 | + //alert(strDel); | |
108 | } | |
109 | function url_go(strURL) { | |
110 | document.location = strURL; |