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