Changeset 1290
- Timestamp:
- 01/13/07 15:56:11 (6 years ago)
- Location:
- ccsweb/trunk/ccs_mods/graphs
- Files:
-
- 2 edited
-
graphs.php (modified) (4 diffs)
-
index.tpl (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
ccsweb/trunk/ccs_mods/graphs/graphs.php
r1285 r1290 52 52 53 53 //Create arrays for host list 54 $ids = array();55 $names = array();56 $c = 0;57 foreach ($hosts as $idx=>$host) {58 $ids[$c] = $host["host_id"];59 $names[$c] = $host["host_name"];60 $c++;61 }54 //$ids = array(); 55 //$names = array(); 56 //$c = 0; 57 //foreach ($hosts as $idx=>$host) { 58 // $ids[$c] = $host["host_id"]; 59 // $names[$c] = $host["host_name"]; 60 // $c++; 61 //} 62 62 63 63 //Create arrays for link list … … 84 84 $smarty->assign("groups", $groups); 85 85 $smarty->assign("target_ids", $tids); 86 $smarty->assign("host_ids", $ids); 86 //$smarty->assign("host_ids", $ids); 87 $smarty->assign("hosts", $hosts); 87 88 $smarty->assign("link_ids", $lids); 88 89 $smarty->assign("target_names", $tnames); 89 $smarty->assign("host_names", $names);90 //$smarty->assign("host_names", $names); 90 91 $smarty->assign("link_names", $lnames); 91 92 $smarty->assign("scripts", array("graphs.js")); … … 153 154 $vgraphs = $e[1]; 154 155 }else if ($_REQUEST["main"] == "target"){ 156 $e = do_xmlrpc("getGraphserver", array(), $xmlrpc_conn, TRUE, FALSE); 157 if (xmlrpc_has_error($e)) { 158 ccs_notice("Could not retrieve graghserver: " . 159 xmlrpc_error_string($e)); 160 $e = array(); 161 } 162 $server = $e; 155 163 if ($_REQUEST["target_id"] != ''){ 156 164 list($host_name, $graph_id, $num, $ip_address,$description) = split("-",$_REQUEST["target_id"],5); … … 165 173 $smarty->assign("server", $server); 166 174 $smarty->assign("mirror", $_REQUEST["mirror"]); 175 $smarty->assign("force", $_REQUEST["force"]); 167 176 $smarty->assign("main", $_REQUEST["main"]); 168 177 $smarty->assign("host_id", $_REQUEST["host_id"]); -
ccsweb/trunk/ccs_mods/graphs/index.tpl
r1285 r1290 28 28 <table> 29 29 <tr><td class="bodyText"><input type="radio" name="main" value="host" id="host" onClick="toggle();" {if $main=="host" || $main==""}checked{/if} /> Host:</td><td> 30 {if $main=="host" || $main==""} 31 {html_options values=$host_ids output=$host_names selected=$host_id name="host_id" id="host_id"} 32 {else} 33 {html_options values=$host_ids output=$host_names selected=$host_id name="host_id" id="host_id" disabled=true} 34 {/if} 30 <select id="host_id" name="host_id"{if !($main=="host" || $main=="")} DISABLED {/if} /> 31 <option value=-1>--ALL--</option> 32 {foreach from=$hosts item=host} 33 <option value="{$host.host_id}" {if $host.host_id == $host_id}selected="selected"{/if}>{$host.host_name}</option> 34 {/foreach} 35 35 36 </td> 36 37 <tr><td class="bodyText"><input type="radio" name="main" value="link" id="link" onClick="toggle();" {if $main=="link"}checked{/if}/> Link:</td><td> … … 59 60 </td></tr> 60 61 <tr><td class="bodyText">Mirror:</td><td><input type="checkbox" name="mirror" id="mirror" {if $mirror=="on"}checked{/if} {if $main!="host" && $main!=''}disabled{/if}/></td></tr> 62 <tr><td class="bodyText">Force Redraw:</td><td><input type="checkbox" name="force" id="force" {if $force=="on"}checked{/if} /></td></tr> 61 63 </table> 62 64 <input type="submit" value="Refresh" class="inputbox"/> … … 72 74 </select> 73 75 Graph of {$graph.host_name} - {if $graph.description != ''}{$graph.description}-{$graph.ip_address}{else}{$graph.ip_address}{/if}<br /> 74 <img id="img{$i++}" src="http://{$server}/graphs/{$graph.host_name}/{$time_id}/{$graph.graph_id}?number={$graph.num} &force=1"><br />76 <img id="img{$i++}" src="http://{$server}/graphs/{$graph.host_name}/{$time_id}/{$graph.graph_id}?number={$graph.num}{if $force=="on"}&force=1{/if}"><br /> 75 77 </td><td> 76 78 {if $graph.num2 != ''} 77 79 Graph of {$graph.host_name2} - {if $graph.description != ''}{$graph.description}-{$graph.ip_address2}{else}{$graph.ip_address2}{/if}<br /> 78 <img src="http://{$server}/graphs/{$graph.host_name2}/{$time_id}/{$graph.graph_id}?number={$graph.num2} &force=1"><br />80 <img src="http://{$server}/graphs/{$graph.host_name2}/{$time_id}/{$graph.graph_id}?number={$graph.num2}{if $force=="on"}&force=1{/if}"><br /> 79 81 {/if} 80 82 </td></tr> … … 82 84 </table> 83 85 {include file="footer.tpl"} 86 {debug}
Note: See TracChangeset
for help on using the changeset viewer.
