]> git.sur5r.net Git - bacula/bacula/blob - gui/bacula-web/templates/last_run_report.tpl
bacula-web: Improved Elapsed time function
[bacula/bacula] / gui / bacula-web / templates / last_run_report.tpl
1 <!-- last_run_report.tpl -->
2
3 <div class="box">
4         <p class="title">Last 24 hours status</p>
5 {* {if $mode == "Lite" && $smarty.get.Full_popup != "yes"} *}
6 <table>
7  <tr>
8         <td class="label">Failed jobs</td> <td class="info">{$failed_jobs}</td>
9  </tr>
10  <tr>
11         <td class="label">Completed jobs</td> <td class="info">{$completed_jobs}</td>
12  </tr> 
13  <tr>
14         <td class="label">Elapsed time</td> <td class="info">{$elapsed_jobs}</td>
15  </tr>
16  <tr>
17         <td class="label">Transferred Bytes</td> <td class="info">{$bytes_totales}</td>
18  </tr> 
19  <tr>
20         <td colspan=2 align=center>
21                 <a href="javascript:OpenWin('index.php?Full_popup=yes','490','350')">{t}Show details{/t}</a>
22         </td>
23  </tr>
24 </table>
25  
26 {* {if $status != 0} *}
27 <table>
28         <tr>
29                 <td colspan=2>
30                         <table border=0 cellpadding=0 cellspacing=0>
31                                 <tr>
32                                         <td align=right colspan=4 height=25 background="images/bg7.gif" style="font-size: 12px">
33                                                 <b>{t}Jobs with errors{/t}</b>
34                                         </td>
35                                 </tr>
36                                 <tr>
37                                         <td background="style/images/bg6.png"><b>JobId&nbsp;</b></td>
38                                         <td background="style/images/bg6.png"><b>{t}Name{/t}</b></td>
39                                         <td background="style/images/bg6.png"><b>{t}EndTime{/t}</b></td>
40                                         <td background="style/images/bg6.png"><b>{t}JobStatus{/t}</b></td>
41                                 </tr>
42                                 {section name=row loop=$errors_array} 
43                                 <tr {* bgcolor=#{cycle values="E6E6F5,E1E5E0"} *}>
44                                         {section name=tmp loop=$errors_array[row]}
45                                         <td {if $smarty.section.tmp.iteration == 4}align=center 
46                                 {if $errors_array[row][tmp] == "C"}
47                                         {assign var=pop value="Created but not yet running"}
48                                 {elseif $errors_array[row][tmp] == "R"}
49                                         {assign var=pop value="Running"}
50                                 {elseif $errors_array[row][tmp] == "B"}
51                                         {assign var=pop value="Blocked"}
52                                 {elseif $errors_array[row][tmp] == "E"}
53                                         {assign var=pop value="Terminated in Error"}
54                                 {elseif $errors_array[row][tmp] == "e"}
55                                         {assign var=pop value="Non-fatal error"}
56                                 {elseif $errors_array[row][tmp] == "f"}
57                                         {assign var=pop value="Fatal error"}
58                                 {elseif $errors_array[row][tmp] == "D"}
59                                         {assign var=pop value="Verify Differences"}
60                                 {elseif $errors_array[row][tmp] == "A"}
61                                         {assign var=pop value="Canceled by the user"}
62                                 {elseif $errors_array[row][tmp] == "F"}
63                                         {assign var=pop value="Waiting on the File daemon"}
64                                 {elseif $errors_array[row][tmp] == "S"}
65                                         {assign var=pop value="Waiting on the Storage daemon"}
66                                 {elseif $errors_array[row][tmp] == "m"}
67                                         {assign var=pop value="Waiting for a new Volume to be mounted"}
68                                 {elseif $errors_array[row][tmp] == "M"}
69                                         {assign var=pop value="Waiting for a Mount"}
70                                 {elseif $errors_array[row][tmp] == "s"}
71                                         {assign var=pop value="Waiting for Storage resource"}
72                                 {elseif $errors_array[row][tmp] == "j"}
73                                         {assign var=pop value="Waiting for Job resource"}
74                                 {elseif $errors_array[row][tmp] == "c"}
75                                         {assign var=pop value="Waiting for Client resource"}
76                                 {elseif $errors_array[row][tmp] == "d"}
77                                         {assign var=pop value="Wating for Maximum jobs"} 
78                                 {elseif $errors_array[row][tmp] == "t"}
79                                         {assign var=pop value="Waiting for Start Time"}
80                                 {elseif $errors_array[row][tmp] == "p"}
81                                         {assign var=pop value="Waiting for higher priority job to finish"}
82                                 {/if}
83                         {popup caption="Status detail" autostatus=yes fgcolor=red textcolor=yellow text="$pop"}
84                                                 {/if}                                   
85                                         >
86                                                 {if $smarty.section.tmp.iteration == 2}
87                             <a href=report.php?default=1&server={$errors_array[row][tmp]} target="_blank">
88                         {/if}    
89                                                 {$errors_array[row][tmp]}
90                                                 {if $smarty.section.row.iteration == 2}
91                                                         </a>
92                                                 {/if}
93                                         </td>
94                                         {/section}
95                                 </tr>
96                                 {/section}
97                         </table>
98                 </td>
99         </tr>
100 </table>        
101  {* {/if} *}
102 </div> <!-- end div box --> 
103  
104 <div class="box">
105         <p class="title">Detailled report</p>
106  
107  <form method="get" action="report.php" target="_blank">
108    <table width="100%" cellpadding="0" cellspacing="3" border="0">
109 <!--
110                         <tr bgcolor=white>
111                                 <td colspan="3" style="text-align: center; background-image: url('style/images/bg1.png'); font-size: 12px; font-weight: bold;">
112                                 Detailed report
113                                 </td>
114                         </tr>
115 -->             
116          <tr>
117            <td class="label">{t}Select a job:{/t}</td>
118            <td align=center>
119              <input type=hidden name="default" value="1">                               
120                    <select name=server>
121                      {if $smarty.get.server != ""}
122                                 {html_options values=$smarty.get.server output=$smarty.get.server}
123                          {else}
124                             {html_options values=$total_name_jobs output=$total_name_jobs}
125                      {/if}
126                    </select>
127              <input type=submit value="{t}go{/t}">
128            </td>
129      </tr>
130    </table>
131  </form>
132 {* {else if #mode# == "Full" || $smarty.get.Full_popup == "yes"} *}
133 <table>
134         <tr class="tbl_header1">
135                 <td><b>{t}Elapsed time{/t}</b></td>
136                 <td><b>{t}Client{/t}</b></td>
137                 <td><b>{t}Start Time{/t}</b></td>
138                 <td><b>{t}End Time{/t}</b></td>
139                 <td><b>{t}Type{/t}</b></td>
140                 <td><b>{t}Pool{/t}</b></td>
141                 <td><b>{t}Status{/t}</b></td>
142         </tr>
143         {section name=job loop=$clients}
144         <tr class={cycle values="table3,table4"}>
145                 {section name=row loop=$clients[job]}
146                         <td align=left class="size_small">
147                         {if $smarty.section.row.iteration == 2}
148                                 <a href=report.php?default=1&server={$clients[job][row]|escape:"url"} target="_blank">
149                         {/if}
150                         {if $smarty.section.row.last == TRUE}
151                         {if $clients[job][row] eq "T"}
152                                 <img src={#root#}/style/images/s_ok.gif>
153                         {else}
154                                 <img src={#root#}/style/images/s_error.gif>
155                         {/if}
156                         {else}
157                                 {$clients[job][row]}
158                         {/if}
159                                 {if $smarty.section.row.iteration == 2}
160                         </a>
161                         {/if}
162                         </td>
163                 {/section}
164         </tr>
165                 {/section}
166         </td>
167  </tr>
168 </table>
169 {* {/if} *}
170
171 </div>
172 <!-- end last_run_report.tpl -->