1 <%@ MasterClass="Application.Layouts.Main" Theme="Baculum-v1"%>
2 <com:TContent ID="Main">
4 <img id="logo" src="<%=$this->getPage()->getTheme()->getBaseUrl()%>/logo.png" alt="Baculum" />
5 <div id="directors"><com:TLabel ForControl="Director" Text="<%[ Director: ]%>" />
6 <com:TActiveDropDownList ID="Director" OnTextChanged="director" />
8 <div id="panel_switcher">
9 <img src="<%=$this->getPage()->getTheme()->getBaseUrl()%>/dashboard.png" alt="" onclick="$('<%=$this->Dashboard->ClientID%>').click()" />
10 <com:TActiveLinkButton ID="Dashboard" Text="<%[ Dashboard ]%>" Attributes.onclick="PanelWindow.show('dashboard'); return false;" />
11 <img src="<%=$this->getPage()->getTheme()->getBaseUrl()%>/workspace.png" alt="" onclick="$('<%=$this->Workspace->ClientID%>').click()"/>
12 <com:TActiveLinkButton ID="Workspace" Text="<%[ Workspace ]%>" Attributes.onclick="PanelWindow.show('container'); return false;" />
13 <img src="<%=$this->getPage()->getTheme()->getBaseUrl()%>/graphs.png" alt="" onclick="$('<%=$this->Graphs->ClientID%>').click()" />
14 <com:TActiveLinkButton ID="Graphs" Text="<%[ Graphs ]%>" Attributes.onclick="PanelWindow.show('graphs'); return false;" />
16 <com:Application.Portlets.TrayBar ID="TrayBar" />
20 <div class="dashboard_graph">
21 <div id="jobs_summary_graph">
22 <script type="text/javascript">
23 var oJobsStates = <%=$this->jobs_states%>;
26 <span><%[ Jobs status summary ]%></span>
28 <div id="dashboard_icons">
29 <fieldset class="dashboard_field">
30 <legend><%[ Clients ]%></legend>
31 <img src="<%=$this->getPage()->getTheme()->getBaseUrl()%>/client.png" alt="" />
32 <p><span><%[ Number of clients: ]%></span><span id="clients_no"></span></p>
33 <p><span><%[ Most often used: ]%></span><span id="clients_most"></span></p>
34 <p><span><%[ Jobs count on most used: ]%></span><span id="clients_jobs"></span> <%[ jobs ]%></p>
36 <fieldset class="dashboard_field">
37 <legend><%[ Quick job access ]%></legend>
38 <img src="<%=$this->getPage()->getTheme()->getBaseUrl()%>/quick-access.png" alt="" />
39 <p><span><%[ Jump to job (last 100): ]%></span></p><select id="jobs_to_view"></select>
40 <p class="right"><a href="javascript:void(0)" onclick="SlideWindow.getObj('JobWindow').quickJumpToElement($('jobs_to_view').value, '<%=$this->JobBtn->ClientID%>', PanelWindow);"><%[ View ]%></a></p>
42 <fieldset class="dashboard_field">
43 <legend><%[ Finished jobs ]%></legend>
44 <img src="<%=$this->getPage()->getTheme()->getBaseUrl()%>/finished-jobs.png" alt="" />
45 <p><span><%[ Most often used: ]%></span><span id="jobs_most"></span></p>
46 <p><span><%[ Execution count most used: ]%></span><span id="jobs_most_count"></span> <%[ times ]%></p>
48 <fieldset class="dashboard_field"<%=$this->User->getIsAdmin() === false ? ' style="display: none;"' : ''%>>
49 <legend><%[ Database ]%></legend>
50 <img src="<%=$this->getPage()->getTheme()->getBaseUrl()%>/database.png" alt="" />
51 <p><span><%[ Database type: ]%></span><span><%=$this->dbtype%></span></p>
52 <p><span><%[ Database size: ]%></span><span id="database_size"></span></p>
54 <fieldset class="dashboard_field">
55 <legend><%[ Pools ]%></legend>
56 <img src="<%=$this->getPage()->getTheme()->getBaseUrl()%>/tapes.png" alt="" />
57 <p><span><%[ Number of pools: ]%></span><span id="pools_no"></span></p>
58 <p><span><%[ Most often used: ]%></span><span id="pools_most"></span></p>
59 <p><span><%[ Jobs count on most used: ]%></span><span id="pools_jobs"></span> <%[ jobs ]%></p>
61 <fieldset class="dashboard_field">
62 <legend><%[ Job Totals ]%></legend>
63 <img src="<%=$this->getPage()->getTheme()->getBaseUrl()%>/jobtotals.png" alt="" />
64 <p><span><%[ Total bytes: ]%></span><span id="jobs_total_bytes"></span></p>
65 <p><span><%[ Total files: ]%></span><span id="jobs_total_files"></span></p>
67 <fieldset class="dashboard_field">
68 <legend><%[ Restore Wizard ]%></legend>
69 <a class="big" href="<%=$this->Service->constructUrl('RestoreWizard')%>" style="line-height: 73px; margin: 0 45px"><img src="<%=$this->getPage()->getTheme()->getBaseUrl()%>/restore.png" alt="" /><%[ Perform Restore ]%></a>
71 <fieldset class="dashboard_field"<%=$this->User->getIsAdmin() === false ? ' style="display: none;"' : ''%>>
72 <legend><%[ Configuration Wizard ]%></legend>
73 <a class="big" href="<%=$this->Service->constructUrl('ConfigurationWizard')%>" style="line-height: 73px; margin: 0 45px"><img src="<%=$this->getPage()->getTheme()->getBaseUrl()%>/setting.png" alt="" /><%[ Baculum Settings ]%></a>
76 <div style="clear: both"></div>
79 <div id="container" style="display: none;">
81 <com:TActiveButton ID="StorageBtn" CssClass="storage-btn">
82 <prop:Attributes.onmouseover>
85 '<%=Prado::localize('Storage Daemons')%>',
86 '<%=Prado::localize('Configuration of storage daemons.')%>'
88 </prop:Attributes.onmouseover>
89 <prop:ClientSide.OnLoading>
90 SlideWindow.getObj('StorageWindow').showProgress(true);
91 </prop:ClientSide.OnLoading>
92 <prop:ClientSide.OnComplete>
93 SlideWindow.getObj('StorageWindow').setWindowElementsEvent({
94 repeater_id: '<%=$this->StorageWindow->Repeater->ClientID%>',
95 grid_id: '<%=$this->StorageWindow->DataGrid->ClientID%>',
96 request_obj: <%=$this->StorageWindow->DataElementCall->ActiveControl->Javascript%>
98 </prop:ClientSide.OnComplete>
100 <com:TActiveButton ID="ClientBtn" CssClass="client-btn">
101 <prop:Attributes.onmouseover>
104 '<%=Prado::localize('Clients')%>',
105 '<%=Prado::localize('Configuration of clients daemons.')%>'
107 </prop:Attributes.onmouseover>
108 <prop:ClientSide.OnLoading>
109 SlideWindow.getObj('ClientWindow').showProgress(true);
110 </prop:ClientSide.OnLoading>
111 <prop:ClientSide.OnComplete>
112 SlideWindow.getObj('ClientWindow').setWindowElementsEvent({
113 repeater_id: '<%=$this->ClientWindow->Repeater->ClientID%>',
114 grid_id: '<%=$this->ClientWindow->DataGrid->ClientID%>',
115 request_obj: <%=$this->ClientWindow->DataElementCall->ActiveControl->Javascript%>
117 </prop:ClientSide.OnComplete>
119 <com:TActiveButton ID="VolumeBtn" CssClass="media-btn">
120 <prop:Attributes.onmouseover>
123 '<%=Prado::localize('Volumes')%>',
124 '<%=Prado::localize('Management of volumes.')%>'
126 </prop:Attributes.onmouseover>
127 <prop:ClientSide.OnLoading>
128 SlideWindow.getObj('VolumeWindow').showProgress(true);
129 </prop:ClientSide.OnLoading>
130 <prop:ClientSide.OnComplete>
131 SlideWindow.getObj('VolumeWindow').setWindowElementsEvent({
132 repeater_id: '<%=$this->VolumeWindow->Repeater->ClientID%>',
133 grid_id: '<%=$this->VolumeWindow->DataGrid->ClientID%>',
134 request_obj: <%=$this->VolumeWindow->DataElementCall->ActiveControl->Javascript%>
136 </prop:ClientSide.OnComplete>
138 <com:TActiveButton ID="PoolBtn" CssClass="pool-btn">
139 <prop:Attributes.onmouseover>
142 '<%=Prado::localize('Pools')%>',
143 '<%=Prado::localize('Management of volumes pools.')%>'
145 </prop:Attributes.onmouseover>
146 <prop:ClientSide.OnLoading>
147 SlideWindow.getObj('PoolWindow').showProgress(true);
148 </prop:ClientSide.OnLoading>
149 <prop:ClientSide.OnComplete>
150 SlideWindow.getObj('PoolWindow').setWindowElementsEvent({
151 repeater_id: '<%=$this->PoolWindow->Repeater->ClientID%>',
152 grid_id: '<%=$this->PoolWindow->DataGrid->ClientID%>',
153 request_obj: <%=$this->PoolWindow->DataElementCall->ActiveControl->Javascript%>
155 </prop:ClientSide.OnComplete>
157 <com:TActiveButton ID="JobBtn" CssClass="job-btn">
158 <prop:Attributes.onmouseover>
161 '<%=Prado::localize('Jobs')%>',
162 '<%=Prado::localize('Jobs settings.')%>'
164 </prop:Attributes.onmouseover>
165 <prop:ClientSide.OnLoading>
166 SlideWindow.getObj('JobWindow').showProgress(true);
167 </prop:ClientSide.OnLoading>
168 <prop:ClientSide.OnComplete>
169 SlideWindow.getObj('JobWindow').setWindowElementsEvent({
170 repeater_id: '<%=$this->JobWindow->Repeater->ClientID%>',
171 grid_id: '<%=$this->JobWindow->DataGrid->ClientID%>',
172 request_obj: <%=$this->JobWindow->DataElementCall->ActiveControl->Javascript%>,
173 actions_obj: <%=$this->JobWindow->RunJobCall->ActiveControl->Javascript%>
175 </prop:ClientSide.OnComplete>
177 <com:TActiveButton ID="JobRunBtn" CssClass="jobrun-btn">
178 <prop:Attributes.onmouseover>
181 '<%=Prado::localize('Run job')%>',
182 '<%=Prado::localize('Starting jobs.')%>'
184 </prop:Attributes.onmouseover>
185 <prop:ClientSide.OnLoading>
186 SlideWindow.getObj('JobRunWindow').showProgress(true);
187 </prop:ClientSide.OnLoading>
188 <prop:ClientSide.OnComplete>
189 SlideWindow.getObj('JobRunWindow').setWindowElementsEvent({
190 repeater_id: '<%=$this->JobRunWindow->Repeater->ClientID%>',
191 grid_id: '<%=$this->JobRunWindow->DataGrid->ClientID%>',
192 request_obj: <%=$this->JobRunWindow->DataElementCall->ActiveControl->Javascript%>
194 </prop:ClientSide.OnComplete>
196 <com:TActiveButton CssClass="restore-btn" OnClick="restore">
197 <prop:Attributes.onmouseover>
200 '<%=Prado::localize('Restore')%>',
201 '<%=Prado::localize('Restore wizard.')%>'
203 </prop:Attributes.onmouseover>
205 <com:TActiveButton ID="SettingsWizardBtn" CssClass="setting-btn" OnClick="configuration">
206 <prop:Attributes.onmouseover>
209 '<%=Prado::localize('Settings')%>',
210 '<%=Prado::localize('Management settings wizard.')%>'
212 </prop:Attributes.onmouseover>
215 <com:TActivePanel ID="Content">
217 <com:Application.Portlets.StorageList ID="StorageWindow" ButtonID="<%=$this->StorageBtn->ClientID%>" WindowTitle="<%[ Storage Daemons ]%>" />
218 <com:Application.Portlets.ClientList ID="ClientWindow" ButtonID="<%=$this->ClientBtn->ClientID%>" WindowTitle="<%[ Clients ]%>" />
219 <com:Application.Portlets.VolumeList ID="VolumeWindow" ButtonID="<%=$this->VolumeBtn->ClientID%>" WindowTitle="<%[ Volumes ]%>" />
220 <com:Application.Portlets.PoolList ID="PoolWindow" ButtonID="<%=$this->PoolBtn->ClientID%>" WindowTitle="<%[ Pools ]%>" />
221 <com:Application.Portlets.JobList ID="JobWindow" ButtonID="<%=$this->JobBtn->ClientID%>" WindowTitle="<%[ Jobs ]%>" />
222 <com:Application.Portlets.JobRunList ID="JobRunWindow" ButtonID="<%=$this->JobRunBtn->ClientID%>" WindowTitle="<%[ Jobs for run ]%>" />
223 <div id="configuration">
224 <div id="configuration-box">
225 <div id="configuration-progress" class="configuration-progress"></div>
227 <com:Application.Portlets.VolumeConfiguration ID="VolumeConfiguration" />
228 <com:Application.Portlets.StorageConfiguration ID="StorageConfiguration" />
229 <com:Application.Portlets.ClientConfiguration ID="ClientConfiguration" />
230 <com:Application.Portlets.PoolConfiguration ID="PoolConfiguration" />
231 <com:Application.Portlets.JobConfiguration ID="JobConfiguration" />
232 <com:Application.Portlets.JobRunConfiguration ID="JobRunConfiguration" />
237 <div id="graphs" style="display: none;">
238 <select id="time_range" name="time_range">
239 <option value="23400"><%[ Last 6 hours ]%></option>
240 <option value="43200"><%[ Last 12 hours ]%></option>
241 <option value="86400" selected="selected"><%[ Today ]%></option>
242 <option value="172800"><%[ Two days ]%></option>
243 <option value="604800"><%[ Last week ]%></option>
244 <option value="1209600"><%[ Last two weeks ]%></option>
245 <option value="2592000"><%[ Last month ]%></option>
246 <option value="7776000"><%[ Last three months ]%></option>
247 <option value="15768000"><%[ Last six months ]%></option>
248 <option value="31536000"><%[ Last year ]%></option>
251 <%[ Date From: ]%> <com:TDatePicker ID="DateFrom" DateFormat="yyyy-MM-dd" Width="80px" />
252 <%[ Date To: ]%> <com:TDatePicker ID="DateTo" DateFormat="yyyy-MM-dd" Width="80px" />
254 <span><%[ Client: ]%></span>
255 <com:TActiveDropDownList ID="Clients" CssClass="textbox" AutoPostBack="false" Width="160px" Style="display: inline" />
256 <span><%[ Job name: ]%></span>
257 <com:TActiveDropDownList ID="Jobs" CssClass="textbox" AutoPostBack="false" Width="160px" Style="display: inline" />
258 <p><%[ Legend: ]%></p>
259 <div id="legend"></div>
260 <div id="graphs_content">
261 <script type="text/javascript">
262 var jobs = <%=$this->getJobs()%>;
265 <script type="text/javascript">
267 "graph_title": "<%[ Graph: Jobs size / Time ]%>",
268 "xaxis_title": "<%[ Time ]%>",
269 "yaxis_title": "<%[ Jobs size (GiB) ]%>"
272 document.observe("dom:loaded", function() {
273 PanelWindow.onShow = function() {
274 if (PanelWindow.currentWindowId === 'graphs' && typeof(graph) == "undefined") {
275 graph = new GraphClass(jobs, graph_lang, 'graphs_content', 'legend', 'time_range', '<%=$this->DateFrom->ClientID%>', '<%=$this->DateTo->ClientID%>', '<%=$this->Clients->ClientID%>', '<%=$this->Jobs->ClientID%>');
276 } else if (PanelWindow.currentWindowId === 'dashboard') {
277 Dashboard.update_all(Statistics, TEXT);
282 <p class="right bold italic"><%[ Tip: for getting zoom, please mark area on graph. ]%></p>
283 <p class="right bold italic"><%[ Tip 2: for back from zoom, please click somewhere on graph. ]%></p>
286 <a id="clear_bvfs_cache" href="javascript: void(0)"><com:TActiveImageButton ID="ClearBvfsCache" OnCallback="clearBvfsCache" Attributes.onclick="return (confirm('<%=Prado::localize('This action will clear bvfs cache that was created during preparing restore files. There is not recommended use this action during restore job working. Are you sure?')%>'));" ImageUrl="<%=$this->getPage()->getTheme()->getBaseUrl()%>/trash_icon.png" AlternateText="<%[ clear bvfs cache ]%>" /><com:TLabel ForControl="ClearBvfsCache"><%[ clear bvfs cache ]%></com:TLabel></a>
287 <a id="logging" href="javascript:void(0)"><com:TActiveCheckBox ID="Logging" OnCallback="setDebug" Attributes.onclick="return (this.checked === false || confirm('<%=Prado::localize('Debug files enable possibility to save most of actions executed on Baculum WebGUI. Debug functionality should be enabled if is happening shomething wrong with Baculum or something that looks like a bug. Logs can be useful for detecting a problems in Baculum working. After confirmation this message Baculum debug files will be continuously saving in /protected/Data/ directory. Are you sure?')%>'));" /><com:TLabel ForControl="Logging"><%[ Enable debug ]%></com:TLabel></a>
288 <a id="volumes_tools_launcher" href="javascript:void(0)" <%=$this->User->getIsAdmin() === false ? ' style="display: none;"' : ''%>><img src="<%=$this->getPage()->getTheme()->getBaseUrl()%>/tape_tools_icon.png" alt="<%[ volumes tools ]%>" /><span><%[ volumes tools ]%></span></a>
289 <a id="console_launcher" href="javascript:void(0)"><img src="<%=$this->getPage()->getTheme()->getBaseUrl()%>/console_icon.png" alt="<%[ Bacula console ]%>" /><span><%[ show console ]%></span></a>
290 <com:Application.Portlets.VolumesTools ID="VolumesTools" />
291 <com:Application.Portlets.Console ID="Console" />
293 <div id="bottom"></div>
294 <script type="text/javascript">
296 document.observe("dom:loaded", function() {
297 <%=(!is_null($this->initWindowId) && !is_null($this->initElementId) ?
298 'SlideWindow.getObj("' . $this->initWindowId . 'Window").setInitElementId("' . $this->initElementId . '");'
300 <%=(!is_null($this->openWindow) ?
301 'PanelWindow.show("container");
302 $("' . $this->openWindow . '").click();
303 window.history.pushState("", "", "/");'
307 level: '<%[ level ]%>',
308 status: '<%[ status ]%>',
309 starttime: '<%[ start time ]%>'