]> git.sur5r.net Git - bacula/bacula/blobdiff - gui/baculum/protected/Portlets/JobList.tpl
baculum: Switch to started job status just after job start
[bacula/bacula] / gui / baculum / protected / Portlets / JobList.tpl
index cdde59509b843cc2acecaf8c991bbaa745256483..e79d97f9ff214511b89c272d4a2b9cd413fd5829 100644 (file)
@@ -1,7 +1,7 @@
 <%@ MasterClass="Application.Portlets.SlideWindow" %>
 <com:TContent ID="SlideWindowContent">
-       <com:TActivePanel ID="RepeaterShow">
-       <com:TActiveRepeater ID="Repeater">
+       <com:TActivePanel ID="RepeaterShow" EnableViewState="false">
+       <com:TActiveRepeater ID="Repeater" EnableViewState="false">
                <prop:ItemTemplate>
                        <com:TPanel ID="JobElement" CssClass="slide-window-element">
                                <img src="<%=$this->getPage()->getTheme()->getBaseUrl()%>/job-icon.png" alt="" /> [<%=@$this->DataItem->jobid%>] <%=@$this->DataItem->name%>
@@ -13,6 +13,7 @@
        <com:TActivePanel ID="DataGridShow">
        <com:TActiveDataGrid
                ID="DataGrid"
+               EnableViewState="false"
                AutoGenerateColumns="false"
                AllowSorting="false"
                OnSortCommand="sortDataGrid"
@@ -21,7 +22,7 @@
                ItemStyle.CssClass="slide-window-element"
                AlternatingItemStyle.CssClass="slide-window-element-alternating"
        >
-               <com:TActiveTemplateColumn HeaderText="<input type='checkbox' name='actions_checkbox' onclick=SlideWindow.getObj('JobWindow').markAllChecked(this.checked)>">
+               <com:TActiveTemplateColumn HeaderText="<input type='checkbox' name='actions_checkbox' onclick=SlideWindow.getObj('JobWindow').markAllChecked(this.checked)>" ItemStyle.HorizontalAlign="Center">
                        <prop:ItemTemplate>
                                <input type="checkbox" name="actions_checkbox" value="<%=$this->getParent()->Data['jobid']%>" id="<%=$this->getPage()->JobWindow->CheckedValues->ClientID%><%=$this->getParent()->Data['jobid']%>" rel="<%=$this->getPage()->JobWindow->CheckedValues->ClientID%>" onclick="SlideWindow.getObj('JobWindow').markChecked(this.getAttribute('rel'), this.checked, this.value, true);" />
                        </prop:ItemTemplate>
@@ -34,7 +35,7 @@
                />
                <com:TActiveTemplateColumn HeaderText="<%[ Job name ]%>" SortExpression="name">
                        <prop:ItemTemplate>
-                               <div><%=$this->getParent()->Data['name']%></div>
+                               <div title="<%=$this->getParent()->Data['name']%>"><%=$this->getPage()->JobWindow->formatJobName($this->getParent()->Data['name'])%></div>
                                 <input type="hidden" name="<%=$this->getParent()->ClientID%>" value="<%=$this->getParent()->Data['jobid']%>" />
                        </prop:ItemTemplate>
                </com:TActiveTemplateColumn>
                                <div class="job-status-<%=isset($this->getParent()->Data['jobstatus']) ? $this->getParent()->Data['jobstatus'] : ''%>" title="<%=isset($this->getPage()->JobWindow->jobStates[$this->getParent()->Data['jobstatus']]['description']) ? $this->getPage()->JobWindow->jobStates[$this->getParent()->Data['jobstatus']]['description'] : ''%>"><%=isset($this->getPage()->JobWindow->jobStates[$this->getParent()->Data['jobstatus']]['value']) ? $this->getPage()->JobWindow->jobStates[$this->getParent()->Data['jobstatus']]['value'] : ''%></div>
                        </prop:ItemTemplate>
                </com:TActiveTemplateColumn>
-               <com:TActiveBoundColumn
-                       SortExpression="endtime"
-                       HeaderText="<%[ End time ]%>"
-                       DataField="endtime"
-               />
+               <com:TActiveTemplateColumn HeaderText="<%[ Size ]%>" SortExpression="jobbytes">
+                       <prop:ItemTemplate>
+                               <div class="size" rel="<%=$this->getParent()->Data['jobbytes']%>"><%=$this->getParent()->Data['jobbytes']%></div>
+                       </prop:ItemTemplate>
+               </com:TActiveTemplateColumn>
+               <com:TActiveBoundColumn SortExpression="jobfiles" HeaderText="<%[ Files ]%>" DataField="jobfiles" />
+               <com:TActiveTemplateColumn HeaderText="<%[ End time ]%>" SortExpression="endtime">
+                       <prop:ItemTemplate>
+                               <%=$this->getParent()->Data['endtime']%>
+                               <%=in_array($this->getParent()->Data['jobstatus'], $this->getPage()->JobWindow->runningJobStates) ? '<img src="' . $this->getPage()->getTheme()->getBaseUrl() . '/loader-alter.gif" />' : ''%>
+                       </prop:ItemTemplate>
+               </com:TActiveTemplateColumn>
        </com:TActiveDataGrid>
        <com:TActiveHiddenField ID="CheckedValues" />
        </com:TActivePanel>
                <prop:ClientSide.OnComplete>
                        ConfigurationWindow.getObj('JobWindow').show();
                        ConfigurationWindow.getObj('JobWindow').progress(false);
+                       status_callback_func();
+               </prop:ClientSide.OnComplete>
+       </com:TCallback>
+       <com:TCallback ID="RunJobCall" OnCallback="Page.JobWindow.run_again">
+               <prop:ClientSide.OnLoading>
+                       ConfigurationWindow.getObj('JobWindow').progress(true);
+                       var img_btn = $('run_job_again_btn');
+                       var img_src_path = img_btn.readAttribute('src').replace(/[^\/]+\S$/, '');
+                       img_btn.writeAttribute('disabled', 'disabled');
+                       img_btn.writeAttribute('src', img_src_path + 'loader.gif');
+               </prop:ClientSide.OnLoading>
+               <prop:ClientSide.OnComplete>
+                       var img_btn = $('run_job_again_btn');
+                       var img_src_path = img_btn.readAttribute('src').replace(/[^\/]+\S$/, '');
+                       img_btn.writeAttribute('src', img_src_path + 'play.png');
+                       img_btn.removeAttribute('disabled');
+                       ConfigurationWindow.getObj('JobWindow').progress(false);
+                       ConfigurationWindow.getObj('JobWindow').show();
+                       ConfigurationWindow.getObj('JobWindow').switchTabByNo(2);
+                       status_callback_func();
+                       oMonitor();
                </prop:ClientSide.OnComplete>
        </com:TCallback>
+       <div class="actions_btn" style="display: none">
+               <input type="image" id="run_job_again_btn" title="<%[ Run job again ]%>" src="<%=$this->getPage()->getTheme()->getBaseUrl()%>/play.png" onclick="return false" />
+       </div>
 </com:TContent>