Changeset 5912
- Timestamp:
- 07/24/08 16:58:52 (2 months ago)
- Location:
- trunk/centreon/www/include/eventLogs
- Files:
-
- 4 modified
-
GetODSXmlLog.php (modified) (8 diffs)
-
log.xsl (modified) (16 diffs)
-
viewLog.ihtml (modified) (3 diffs)
-
viewLog.php (modified) (13 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/centreon/www/include/eventLogs/GetODSXmlLog.php
r5885 r5912 38 38 require_once 'DB.php'; 39 39 40 include_once(" @CENTREON_ETC@/centreon.conf.php");40 include_once("/etc/centreon/centreon.conf.php"); 41 41 include_once($centreon_path . "www/include/eventLogs/common-Func.php"); 42 42 include_once($centreon_path . "www/DBconnect.php"); … … 81 81 (isset($_GET["alert"]) && !check_injection($_GET["alert"])) ? set_user_param($contact_id, $pearDB, "log_filter_alert", htmlentities($_GET["alert"])) : $alert = "true"; 82 82 (isset($_GET["error"]) && !check_injection($_GET["error"])) ? set_user_param($contact_id, $pearDB, "log_filter_error", htmlentities($_GET["error"])) : $error = "false"; 83 (isset($_GET["oh"]) && !check_injection($_GET["oh"])) ? set_user_param($contact_id, $pearDB, "log_filter_oh", htmlentities($_GET["oh"])) : $oh = "false"; 83 84 84 85 if ($contact_id){ … … 120 121 $warning = $user_params["log_filter_svc_warning"]; 121 122 $critical = $user_params["log_filter_svc_critical"]; 123 $oh = $user_params["log_filter_oh"]; 122 124 } 123 125 … … 172 174 echo "<critical>".$critical."</critical>"; 173 175 echo "<unknown>".$unknown."</unknown>"; 176 echo "<oh>".$oh."</oh>"; 174 177 echo "</infos>"; 175 178 … … 201 204 array_push ($msg_status_set, "'UNREACHABLE'"); 202 205 203 if ($ok == 'true' )206 if ($ok == 'true') 204 207 array_push ($msg_status_set, "'ok'"); 205 if ($warning == 'true' )208 if ($warning == 'true') 206 209 array_push ($msg_status_set, "'warning'"); 207 if ($critical == 'true' )210 if ($critical == 'true') 208 211 array_push ($msg_status_set, "'critical'"); 209 if ($unknown == 'true' )212 if ($unknown == 'true') 210 213 array_push ($msg_status_set, "'unknown'"); 211 214 … … 215 218 $msg_req .= 'OR status is null'; 216 219 $msg_req .=')'; 220 } 221 222 if ($oh == 'true'){ 223 $msg_req .= " AND `type` = 'HARD' "; 217 224 } 218 225 … … 482 489 483 490 echo "<lang>"; 491 484 492 echo "<typeAlert>"._("Type")."</typeAlert>"; 485 493 echo "<notification>"._("notification")."</notification>"; … … 495 503 echo "<critical>"._("critical")."</critical>"; 496 504 echo "<unknown>"._("unknown")."</unknown>"; 505 echo "<oh>"._("Only Hard")."</oh>"; 506 /* 507 * Translation for tables. 508 */ 509 echo "<d>"._("Day")."</d>"; 510 echo "<t>"._("Time")."</t>"; 511 echo "<h>"._("Host")."</h>"; 512 echo "<s>"._("Status")."</s>"; 513 echo "<T>"._("Type")."</T>"; 514 echo "<R>"._("Retry")."</R>"; 515 echo "<o>"._("Output")."</o>"; 516 echo "<c>"._("Contact")."</c>"; 517 echo "<C>"._("Cmd")."</C>"; 518 497 519 echo "</lang>"; 498 520 echo "</root>"; -
trunk/centreon/www/include/eventLogs/log.xsl
r5859 r5912 18 18 <xsl:attribute name="name">notification</xsl:attribute> 19 19 <xsl:attribute name="type">checkbox</xsl:attribute> 20 21 20 <xsl:if test="//infos/notification = 'true'"> 22 21 <xsl:attribute name="checked">checked</xsl:attribute> … … 30 29 <xsl:attribute name="name">alert</xsl:attribute> 31 30 <xsl:attribute name="type">checkbox</xsl:attribute> 32 33 31 <xsl:if test="//infos/alert = 'true'"> 34 32 <xsl:attribute name="checked">checked</xsl:attribute> … … 44 42 <xsl:attribute name="name">error</xsl:attribute> 45 43 <xsl:attribute name="type">checkbox</xsl:attribute> 46 47 44 <xsl:if test="//infos/error = 'true'"> 48 45 <xsl:attribute name="checked">checked</xsl:attribute> … … 66 63 <xsl:attribute name="name">up</xsl:attribute> 67 64 <xsl:attribute name="type">checkbox</xsl:attribute> 68 69 65 <xsl:if test="//infos/up = 'true'"> 70 66 <xsl:attribute name="checked">checked</xsl:attribute> … … 78 74 <xsl:attribute name="name">down</xsl:attribute> 79 75 <xsl:attribute name="type">checkbox</xsl:attribute> 80 81 76 <xsl:if test="//infos/down = 'true'"> 82 77 <xsl:attribute name="checked">checked</xsl:attribute> … … 92 87 <xsl:attribute name="name">unreachable</xsl:attribute> 93 88 <xsl:attribute name="type">checkbox</xsl:attribute> 94 95 89 <xsl:if test="//infos/unreachable = 'true'"> 96 90 <xsl:attribute name="checked">checked</xsl:attribute> … … 114 108 <xsl:attribute name="name">ok</xsl:attribute> 115 109 <xsl:attribute name="type">checkbox</xsl:attribute> 116 117 110 <xsl:if test="//infos/ok = 'true'"> 118 111 <xsl:attribute name="checked">checked</xsl:attribute> … … 126 119 <xsl:attribute name="name">warning</xsl:attribute> 127 120 <xsl:attribute name="type">checkbox</xsl:attribute> 128 129 121 <xsl:if test="//infos/warning = 'true'"> 130 122 <xsl:attribute name="checked">checked</xsl:attribute> … … 140 132 <xsl:attribute name="name">critical</xsl:attribute> 141 133 <xsl:attribute name="type">checkbox</xsl:attribute> 142 143 134 <xsl:if test="//infos/critical = 'true'"> 144 135 <xsl:attribute name="checked">checked</xsl:attribute> … … 152 143 <xsl:attribute name="name">unknown</xsl:attribute> 153 144 <xsl:attribute name="type">checkbox</xsl:attribute> 154 155 145 <xsl:if test="//infos/unknown = 'true'"> 156 146 <xsl:attribute name="checked">checked</xsl:attribute> … … 158 148 </xsl:element> 159 149 <xsl:value-of select="//lang/unknown"/> 150 </td> 151 </tr> 152 </table> 153 </td> 154 <td> 155 <xsl:value-of select="//lang/T"/> 156 </td> 157 <td> 158 <table> 159 <tr> 160 <td rowspan="2"> 161 <xsl:element name='input'> 162 <xsl:attribute name="onClick">log_4_host('<xsl:value-of select="//opid"/>', this.form, ''); return false;</xsl:attribute> 163 <xsl:attribute name="name">oh</xsl:attribute> 164 <xsl:attribute name="type">checkbox</xsl:attribute> 165 <xsl:if test="//infos/oh = 'true'"> 166 <xsl:attribute name="checked">checked</xsl:attribute> 167 </xsl:if> 168 </xsl:element> 169 <xsl:value-of select="//lang/oh"/> 160 170 </td> 161 171 </tr> … … 176 186 <xsl:attribute name="href">#</xsl:attribute> 177 187 <xsl:attribute name="onClick">log_4_host_page('<xsl:value-of select="//opid"/>', this.form,'<xsl:value-of select="first"/>'); return false;</xsl:attribute> 178 179 188 <xsl:element name='img'> 180 189 <xsl:attribute name="title">first</xsl:attribute> … … 198 207 </td> 199 208 </xsl:if> 200 <xsl:for-each select="//page">209 <xsl:for-each select="//page"> 201 210 <td> 202 211 <xsl:element name='a'> … … 212 221 </xsl:element> 213 222 </td> 214 </xsl:for-each>223 </xsl:for-each> 215 224 <xsl:if test="next/@show = 'true'"> 216 225 <td> … … 231 240 <xsl:attribute name="href">#</xsl:attribute> 232 241 <xsl:attribute name="onClick">log_4_host_page('<xsl:value-of select="//opid"/>', this.form,'<xsl:value-of select="last"/>'); return false;</xsl:attribute> 233 234 242 <xsl:element name='img'> 235 243 <xsl:attribute name="title">last</xsl:attribute> … … 246 254 <table class="ListTable"> 247 255 <tr class='ListHeader'> 248 <td class="ListColHeaderCenter"> Day</td>249 <td class="ListColHeaderCenter"> Time</td>250 <td class="ListColHeader Center" colspan="2">Host</td>251 <td class="ListColHeaderCenter"> Status</td>252 <td class="ListColHeaderCenter"> Type</td>253 <td class="ListColHeaderCenter">R etry</td>254 <td class="ListColHeaderCenter"> Output</td>255 <td class="ListColHeaderCenter"> Contact</td>256 <td class="ListColHeaderCenter"> Cmd</td>256 <td class="ListColHeaderCenter"><xsl:value-of select="//lang/d"/></td> 257 <td class="ListColHeaderCenter"><xsl:value-of select="//lang/t"/></td> 258 <td class="ListColHeaderLeft" colspan="2"><xsl:value-of select="//lang/h"/></td> 259 <td class="ListColHeaderCenter"><xsl:value-of select="//lang/s"/></td> 260 <td class="ListColHeaderCenter"><xsl:value-of select="//lang/T"/></td> 261 <td class="ListColHeaderCenter">R</td> 262 <td class="ListColHeaderCenter"><xsl:value-of select="//lang/o"/></td> 263 <td class="ListColHeaderCenter"><xsl:value-of select="//lang/c"/></td> 264 <td class="ListColHeaderCenter"><xsl:value-of select="//lang/C"/></td> 257 265 </tr> 258 266 <xsl:for-each select="//line"> 259 267 <tr> 260 268 <xsl:attribute name="class"><xsl:value-of select="class"/></xsl:attribute> 261 <td style="padding-left:10px;" class="ListColCenter"> 262 <xsl:value-of select="date"/> 263 </td> 264 <td style="padding-left:10px;" class="ListColCenter"> 265 <xsl:value-of select="time"/> 266 </td> 267 <td style="padding-left:10px;"> 268 <xsl:value-of select="host_name"/> 269 </td> 270 <td style="padding-left:10px;"> 271 <xsl:value-of select="service_description"/> 272 </td> 273 <td style="padding-left:10px;" class="ListColCenter"> 274 <xsl:attribute name="style"> 275 background-color:<xsl:value-of select="status/@color"/>; 276 </xsl:attribute> 277 <xsl:value-of select="status"/> 278 </td> 279 <td style="padding-left:10px;" class="ListColCenter"> 280 <xsl:value-of select="type"/> 281 </td> 282 <td style="padding-left:10px;" class="ListColCenter"> 283 <xsl:value-of select="retry"/> 284 </td> 285 <td style="padding-left:10px;"> 286 <xsl:value-of select="output"/> 287 </td> 288 <td style="padding-left:10px;"> 289 <xsl:value-of select="contact"/> 290 </td> 291 <td style="padding-left:10px;White-Space: Nowrap;"> 292 <xsl:value-of select="contact_cmd"/> 293 </td> 269 <td style="padding-left:5px;" class="ListColCenter"><xsl:value-of select="date"/></td> 270 <td style="padding-left:5px;" class="ListColCenter"><xsl:value-of select="time"/></td> 271 <td style="padding-left:5px;" ><xsl:value-of select="host_name"/></td> 272 <td style="padding-left:5px;" ><xsl:value-of select="service_description"/></td> 273 <td style="padding-left:5px;" class="ListColCenter"><xsl:attribute name="style">background-color:<xsl:value-of select="status/@color"/>;</xsl:attribute><xsl:value-of select="status"/></td> 274 <td style="padding-left:5px;padding-right:5px;" class="ListColCenter"><xsl:value-of select="type"/></td> 275 <td style="padding-left:5px;padding-right:5px;" class="ListColCenter"><xsl:value-of select="retry"/></td> 276 <td style="padding-left:5px;white-space:nowrap;" ><xsl:value-of select="output"/></td> 277 <td style="padding-left:5px;" ><xsl:value-of select="contact"/></td> 278 <td style="padding-left:5px;White-Space: Nowrap;"><xsl:value-of select="contact_cmd"/></td> 294 279 </tr> 295 280 </xsl:for-each> 296 281 </table> 282 </div> 283 <div class="pagination"> 284 <table> 285 <tr> 286 <xsl:if test="first/@show = 'true'"> 287 <td> 288 <xsl:element name='a'> 289 <xsl:attribute name="href">#</xsl:attribute> 290 <xsl:attribute name="onClick">log_4_host_page('<xsl:value-of select="//opid"/>', this.form,'<xsl:value-of select="first"/>'); return false;</xsl:attribute> 291 <xsl:element name='img'> 292 <xsl:attribute name="title">first</xsl:attribute> 293 <xsl:attribute name="alt">first</xsl:attribute> 294 <xsl:attribute name="src">./img/icones/16x16/arrow_left_blue_double.gif</xsl:attribute> 295 </xsl:element> 296 </xsl:element> 297 </td> 298 </xsl:if> 299 <xsl:if test="prev/@show = 'true'"> 300 <td> 301 <xsl:element name='a'> 302 <xsl:attribute name="href">#</xsl:attribute> 303 <xsl:attribute name="onClick">log_4_host_page('<xsl:value-of select="//opid"/>', this.form,'<xsl:value-of select="prev"/>'); return false;</xsl:attribute> 304 <xsl:element name='img'> 305 <xsl:attribute name="title">previous</xsl:attribute> 306 <xsl:attribute name="alt">previous</xsl:attribute> 307 <xsl:attribute name="src">./img/icones/16x16/arrow_left_blue.gif</xsl:attribute> 308 </xsl:element> 309 </xsl:element> 310 </td> 311 </xsl:if> 312 <xsl:for-each select="//page"> 313 <td> 314 <xsl:element name='a'> 315 <xsl:attribute name="href">#</xsl:attribute> 316 <xsl:if test="selected = 0"> 317 <xsl:attribute name="class">otherPageNumber</xsl:attribute> 318 </xsl:if> 319 <xsl:if test="selected = 1"> 320 <xsl:attribute name="class">currentPageNumber</xsl:attribute> 321 </xsl:if> 322 <xsl:attribute name="onClick">log_4_host_page('<xsl:value-of select="//opid"/>', this.form,'<xsl:value-of select="num"/>'); return false;</xsl:attribute> 323 <xsl:value-of select="label_page"/> 324 </xsl:element> 325 </td> 326 </xsl:for-each> 327 <xsl:if test="next/@show = 'true'"> 328 <td> 329 <xsl:element name='a'> 330 <xsl:attribute name="href">#</xsl:attribute> 331 <xsl:attribute name="onClick">log_4_host_page('<xsl:value-of select="//opid"/>', this.form,'<xsl:value-of select="next"/>'); return false;</xsl:attribute> 332 <xsl:element name='img'> 333 <xsl:attribute name="title">next</xsl:attribute> 334 <xsl:attribute name="alt">next</xsl:attribute> 335 <xsl:attribute name="src">./img/icones/16x16/arrow_right_blue.gif</xsl:attribute> 336 </xsl:element> 337 </xsl:element> 338 </td> 339 </xsl:if> 340 <xsl:if test="last/@show = 'true'"> 341 <td> 342 <xsl:element name='a'> 343 <xsl:attribute name="href">#</xsl:attribute> 344 <xsl:attribute name="onClick">log_4_host_page('<xsl:value-of select="//opid"/>', this.form,'<xsl:value-of select="last"/>'); return false;</xsl:attribute> 345 346 <xsl:element name='img'> 347 <xsl:attribute name="title">last</xsl:attribute> 348 <xsl:attribute name="alt">last</xsl:attribute> 349 <xsl:attribute name="src">./img/icones/16x16/arrow_right_blue_double.gif</xsl:attribute> 350 </xsl:element> 351 </xsl:element> 352 </td> 353 </xsl:if> 354 </tr> 355 </table> 297 356 </div> 298 357 </div> -
trunk/centreon/www/include/eventLogs/viewLog.ihtml
r5859 r5912 4 4 <div id="div1"> 5 5 <form name="formu"> 6 <table class="period">6 <table class="period"> 7 7 <tr> 8 <td> 9 <input type="radio" name="period_choice" value="auto"> 10 11 {$form.period.label} 12 13 {$form.period.html} 14 15 </td> 16 8 <td><input type="radio" name="period_choice" value="auto"> <b>{$form.period.label}</b> {$form.period.html}</td> 17 9 <td> 18 10 <input type="radio" name="period_choice" value="custom" CHECKED> 19 {$From} 11 <b>{$From}</b> 12 <input id="StartDate" name="StartDate" type="text" value="" onclick="displayDatePicker('StartDate', this)" size="8" /> 13 <input id="StartTime" name="StartTime" type="text" value="" onclick="displayTimePicker('StartTime', this)" size="5" /> 20 14 21 <input id="StartDate" name="StartDate" type="text" value="" onclick="displayDatePicker('StartDate', this)" size="8" /> 22 23 <input id="StartTime" name="StartTime" type="text" value="" onclick="displayTimePicker('StartTime', this)" size="5" /> 24 25 {$To} 26 27 <input id="EndDate" name="EndDate" type="text" value="" onclick="displayDatePicker('EndDate', this)" size="8" /> 28 29 <input id="EndTime" name="EndTime" type="text" value="" onclick="displayTimePicker('EndTime', this)" size="5" /> 15 <b>{$To}</b> 16 <input id="EndDate" name="EndDate" type="text" value="" onclick="displayDatePicker('EndDate', this)" size="8" /> 17 <input id="EndTime" name="EndTime" type="text" value="" onclick="displayTimePicker('EndTime', this)" size="5" /> 30 18 31 19 </td> … … 34 22 </td> 35 23 <td> 36 37 38 <a href="javascript:log_4_host(this, '', 'CSV')"><img src="./img/icones/16x16/text_binary_csv.gif" alt="export CSV"/></a> 39 40 <a href="javascript:log_4_host(this, '', 'Xml')"><img src="./img/icones/16x16/text_binary_xml.gif" alt="export XML"/></a> 24 <a href="javascript:log_4_host(this, '', 'CSV')"><img src="./img/icones/16x16/text_binary_csv.gif" alt="export CSV"/></a> 25 <a href="javascript:log_4_host(this, '', 'Xml')"><img src="./img/icones/16x16/text_binary_xml.gif" alt="export XML" target="_blank"/></a> 41 26 </td> 42 27 </tr> … … 44 29 </form> 45 30 </div> 46 <div id="logView4xml">.. select a log..</div>31 <div id="logView4xml">....</div> -
trunk/centreon/www/include/eventLogs/viewLog.php
