1 <%@ MasterClass="Application.Web.Layouts.Main" Theme="Baculum-v1"%>
2 <com:TContent ID="Main">
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;" />
15 <img src="<%=$this->getPage()->getTheme()->getBaseUrl()%>/users.png" alt="" onclick="$('#<%=$this->Users->ClientID%>').click()" <%=$this->User->getIsAdmin() === false ? ' style="display: none;"' : ''%>/>
16 <com:TActiveLinkButton ID="Users" Text="<%[ Users ]%>" Attributes.onclick="PanelWindow.show('users'); return false;" />
17 <img src="<%=$this->getPage()->getTheme()->getBaseUrl()%>/config.png" alt="" onclick="$('#<%=$this->Config->ClientID%>').click()" />
18 <com:TActiveLinkButton ID="Config" Text="<%[ Configuration ]%>" Attributes.onclick="PanelWindow.show('config'); return false;" />
19 <img src="<%=$this->getPage()->getTheme()->getBaseUrl()%>/logout.png" alt="" onclick="$('#<%=$this->Logout->ClientID%>').click()" />
20 <com:TActiveLinkButton ID="Logout" Text="<%[ Logout ]%>" OnClick="logout" ClientSide.OnComplete="document.location.href = document.location.protocol + '//' + document.location.host;" />
22 <com:Application.Web.Portlets.TrayBar ID="TrayBar" />
27 <div class="dashboard_graph">
28 <div id="jobs_summary_graph">
29 <script type="text/javascript">
30 var oJobsStates = <%=$this->jobs_states%>;
33 <span><%[ Jobs status summary ]%></span>
35 <div id="dashboard_icons">
36 <fieldset class="dashboard_field">
37 <legend><%[ Clients ]%></legend>
38 <img src="<%=$this->getPage()->getTheme()->getBaseUrl()%>/client.png" alt="" />
39 <p><span><%[ Number of clients: ]%></span><span id="clients_no"></span></p>
40 <p><span><%[ Most often used: ]%></span><span id="clients_most"></span></p>
41 <p><span><%[ Jobs count on most used: ]%></span><span id="clients_jobs"></span> <%[ jobs ]%></p>
43 <fieldset class="dashboard_field">
44 <legend><%[ Quick job access ]%></legend>
45 <img src="<%=$this->getPage()->getTheme()->getBaseUrl()%>/quick-access.png" alt="" />
46 <p><span><%[ Jump to job (last 100): ]%></span></p><select id="jobs_to_view"></select>
47 <p class="right"><a href="javascript:void(0)" onclick="SlideWindow.getObj('JobWindow').quickJumpToElement($('#jobs_to_view').val(), '<%=$this->JobBtn->ClientID%>', PanelWindow);"><%[ View ]%></a></p>
49 <fieldset class="dashboard_field">
50 <legend><%[ Finished jobs ]%></legend>
51 <img src="<%=$this->getPage()->getTheme()->getBaseUrl()%>/finished-jobs.png" alt="" />
52 <p><span><%[ Most often used: ]%></span><span id="jobs_most"></span></p>
53 <p><span><%[ Execution count most used: ]%></span><span id="jobs_most_count"></span> <%[ times ]%></p>
55 <fieldset class="dashboard_field"<%=$this->User->getIsAdmin() === false ? ' style="display: none;"' : ''%>>
56 <legend><%[ Database ]%></legend>
57 <img src="<%=$this->getPage()->getTheme()->getBaseUrl()%>/database.png" alt="" />
58 <p><span><%[ Database type: ]%></span><span id="database_type"></span></p>
59 <p><span><%[ Database size: ]%></span><span id="database_size"></span></p>
61 <fieldset class="dashboard_field">
62 <legend><%[ Pools ]%></legend>
63 <img src="<%=$this->getPage()->getTheme()->getBaseUrl()%>/tapes.png" alt="" />
64 <p><span><%[ Number of pools: ]%></span><span id="pools_no"></span></p>
65 <p><span><%[ Most often used: ]%></span><span id="pools_most"></span></p>
66 <p><span><%[ Jobs count on most used: ]%></span><span id="pools_jobs"></span> <%[ jobs ]%></p>
68 <fieldset class="dashboard_field">
69 <legend><%[ Job Totals ]%></legend>
70 <img src="<%=$this->getPage()->getTheme()->getBaseUrl()%>/jobtotals.png" alt="" />
71 <p><span><%[ Total bytes: ]%></span><span id="jobs_total_bytes"></span></p>
72 <p><span><%[ Total files: ]%></span><span id="jobs_total_files"></span></p>
74 <fieldset class="dashboard_field">
75 <legend><%[ Restore Wizard ]%></legend>
76 <a class="big" href="<%=$this->Service->constructUrl('RestoreWizard')%>" style="line-height: 73px; display: block; text-align: center;"><img src="<%=$this->getPage()->getTheme()->getBaseUrl()%>/restore.png" alt="" /><%[ Perform Restore ]%></a>
78 <fieldset class="dashboard_field"<%=$this->User->getIsAdmin() === false ? ' style="display: none;"' : ''%>>
79 <legend><%[ Configuration Wizard ]%></legend>
80 <a class="big" href="<%=$this->Service->constructUrl('WebConfigWizard')%>" style="line-height: 73px; display: block; text-align: center;"><img src="<%=$this->getPage()->getTheme()->getBaseUrl()%>/setting.png" alt="" /><%[ Baculum Settings ]%></a>
83 <div style="clear: both"></div>
86 <div id="container" style="display: none;">
87 <div id="workspace-menu-left">
88 <com:TActiveButton ID="StorageBtn" CssClass="storage-btn" OnClick="Page.StorageWindow.prepareData">
89 <prop:Attributes.onmouseover>
92 '<%=Prado::localize('Storage Daemons')%>',
93 '<%=Prado::localize('Configuration of storage daemons.')%>'
95 </prop:Attributes.onmouseover>
96 <prop:ClientSide.OnLoading>
97 SlideWindow.getObj('StorageWindow').showProgress(true);
98 </prop:ClientSide.OnLoading>
99 <prop:ClientSide.OnComplete>
100 SlideWindow.getObj('StorageWindow').setWindowElementsEvent({
101 repeater_id: '<%=$this->StorageWindow->Repeater->ClientID%>',
102 grid_id: '<%=$this->StorageWindow->DataGrid->ClientID%>',
103 request_obj: <%=$this->StorageWindow->DataElementCall->ActiveControl->Javascript%>
105 </prop:ClientSide.OnComplete>
107 <com:TActiveButton ID="ClientBtn" CssClass="client-btn" OnClick="Page.ClientWindow.prepareData" >
108 <prop:Attributes.onmouseover>
111 '<%=Prado::localize('Clients')%>',
112 '<%=Prado::localize('Configuration of clients daemons.')%>'
114 </prop:Attributes.onmouseover>
115 <prop:ClientSide.OnLoading>
116 SlideWindow.getObj('ClientWindow').showProgress(true);
117 </prop:ClientSide.OnLoading>
118 <prop:ClientSide.OnComplete>
119 SlideWindow.getObj('ClientWindow').setWindowElementsEvent({
120 repeater_id: '<%=$this->ClientWindow->Repeater->ClientID%>',
121 grid_id: '<%=$this->ClientWindow->DataGrid->ClientID%>',
122 request_obj: <%=$this->ClientWindow->DataElementCall->ActiveControl->Javascript%>
124 </prop:ClientSide.OnComplete>
126 <com:TActiveButton ID="VolumeBtn" CssClass="media-btn" OnClick="Page.VolumeWindow.prepareData">
127 <prop:Attributes.onmouseover>
130 '<%=Prado::localize('Volumes')%>',
131 '<%=Prado::localize('Management of volumes.')%>'
133 </prop:Attributes.onmouseover>
134 <prop:ClientSide.OnLoading>
135 SlideWindow.getObj('VolumeWindow').showProgress(true);
136 </prop:ClientSide.OnLoading>
137 <prop:ClientSide.OnComplete>
138 SlideWindow.getObj('VolumeWindow').setWindowElementsEvent({
139 repeater_id: '<%=$this->VolumeWindow->Repeater->ClientID%>',
140 grid_id: '<%=$this->VolumeWindow->DataGrid->ClientID%>',
141 request_obj: <%=$this->VolumeWindow->DataElementCall->ActiveControl->Javascript%>
143 </prop:ClientSide.OnComplete>
145 <com:TActiveButton ID="PoolBtn" CssClass="pool-btn" OnClick="Page.PoolWindow.prepareData">
146 <prop:Attributes.onmouseover>
149 '<%=Prado::localize('Pools')%>',
150 '<%=Prado::localize('Management of volumes pools.')%>'
152 </prop:Attributes.onmouseover>
153 <prop:ClientSide.OnLoading>
154 SlideWindow.getObj('PoolWindow').showProgress(true);
155 </prop:ClientSide.OnLoading>
156 <prop:ClientSide.OnComplete>
157 SlideWindow.getObj('PoolWindow').setWindowElementsEvent({
158 repeater_id: '<%=$this->PoolWindow->Repeater->ClientID%>',
159 grid_id: '<%=$this->PoolWindow->DataGrid->ClientID%>',
160 request_obj: <%=$this->PoolWindow->DataElementCall->ActiveControl->Javascript%>
162 </prop:ClientSide.OnComplete>
164 <com:TActiveButton ID="JobBtn" CssClass="job-btn" OnClick="Page.JobWindow.prepareData">
165 <prop:Attributes.onmouseover>
168 '<%=Prado::localize('Jobs')%>',
169 '<%=Prado::localize('Jobs settings.')%>'
171 </prop:Attributes.onmouseover>
172 <prop:ClientSide.OnLoading>
173 SlideWindow.getObj('JobWindow').showProgress(true);
174 </prop:ClientSide.OnLoading>
175 <prop:ClientSide.OnComplete>
176 SlideWindow.getObj('JobWindow').setWindowElementsEvent({
177 repeater_id: '<%=$this->JobWindow->Repeater->ClientID%>',
178 grid_id: '<%=$this->JobWindow->DataGrid->ClientID%>',
179 request_obj: <%=$this->JobWindow->DataElementCall->ActiveControl->Javascript%>,
180 actions_obj: <%=$this->JobWindow->RunJobCall->ActiveControl->Javascript%>
182 </prop:ClientSide.OnComplete>
184 <com:TActiveButton ID="JobRunBtn" CssClass="jobrun-btn" OnClick="Page.JobRunWindow.prepareData">
185 <prop:Attributes.onmouseover>
188 '<%=Prado::localize('Run job')%>',
189 '<%=Prado::localize('Starting jobs.')%>'
191 </prop:Attributes.onmouseover>
192 <prop:ClientSide.OnLoading>
193 SlideWindow.getObj('JobRunWindow').showProgress(true);
194 </prop:ClientSide.OnLoading>
195 <prop:ClientSide.OnComplete>
196 SlideWindow.getObj('JobRunWindow').setWindowElementsEvent({
197 repeater_id: '<%=$this->JobRunWindow->Repeater->ClientID%>',
198 grid_id: '<%=$this->JobRunWindow->DataGrid->ClientID%>',
199 request_obj: <%=$this->JobRunWindow->DataElementCall->ActiveControl->Javascript%>
201 </prop:ClientSide.OnComplete>
203 <com:TButton CssClass="restore-btn" Attributes.onclick="document.location.href = '<%=$this->Service->constructUrl('RestoreWizard')%>'; return false;">
204 <prop:Attributes.onmouseover>
207 '<%=Prado::localize('Restore')%>',
208 '<%=Prado::localize('Restore wizard.')%>'
210 </prop:Attributes.onmouseover>
212 <com:TButton ID="SettingsWizardBtn" CssClass="setting-btn" Attributes.onclick="document.location.href = '<%=$this->Service->constructUrl('WebConfigWizard')%>'; return false;">
213 <prop:Attributes.onmouseover>
216 '<%=Prado::localize('Settings')%>',
217 '<%=Prado::localize('Management settings wizard.')%>'
219 </prop:Attributes.onmouseover>
222 <com:TActivePanel ID="Content">
224 <com:Application.Web.Portlets.StorageList ID="StorageWindow" ButtonID="<%=$this->StorageBtn->ClientID%>" WindowTitle="<%[ Storage Daemons ]%>" />
225 <com:Application.Web.Portlets.ClientList ID="ClientWindow" ButtonID="<%=$this->ClientBtn->ClientID%>" WindowTitle="<%[ Clients ]%>" />
226 <com:Application.Web.Portlets.VolumeList ID="VolumeWindow" ButtonID="<%=$this->VolumeBtn->ClientID%>" WindowTitle="<%[ Volumes ]%>" />
227 <com:Application.Web.Portlets.PoolList ID="PoolWindow" ButtonID="<%=$this->PoolBtn->ClientID%>" WindowTitle="<%[ Pools ]%>" />
228 <com:Application.Web.Portlets.JobList ID="JobWindow" ButtonID="<%=$this->JobBtn->ClientID%>" WindowTitle="<%[ Jobs ]%>" />
229 <com:Application.Web.Portlets.JobRunList ID="JobRunWindow" ButtonID="<%=$this->JobRunBtn->ClientID%>" WindowTitle="<%[ Jobs for run ]%>" />
230 <div id="configuration">
231 <div id="configuration-box">
232 <div id="configuration-progress" class="configuration-progress"></div>
234 <com:Application.Web.Portlets.VolumeConfiguration ID="VolumeConfiguration" />
235 <com:Application.Web.Portlets.StorageConfiguration ID="StorageConfiguration" />
236 <com:Application.Web.Portlets.ClientConfiguration ID="ClientConfiguration" />
237 <com:Application.Web.Portlets.PoolConfiguration ID="PoolConfiguration" />
238 <com:Application.Web.Portlets.JobConfiguration ID="JobConfiguration" />
239 <com:Application.Web.Portlets.JobRunConfiguration ID="JobRunConfiguration" />
244 <div id="graphs" style="display: none;">
245 <select id="time_range" name="time_range">
246 <option value="23400"><%[ Last 6 hours ]%></option>
247 <option value="43200"><%[ Last 12 hours ]%></option>
248 <option value="86400" selected="selected"><%[ Today ]%></option>
249 <option value="172800"><%[ Two days ]%></option>
250 <option value="604800"><%[ Last week ]%></option>
251 <option value="1209600"><%[ Last two weeks ]%></option>
252 <option value="2592000"><%[ Last month ]%></option>
253 <option value="7776000"><%[ Last three months ]%></option>
254 <option value="15768000"><%[ Last six months ]%></option>
255 <option value="31536000"><%[ Last year ]%></option>
258 <%[ Date From: ]%> <com:TDatePicker ID="DateFrom" DateFormat="yyyy-MM-dd" Width="80px" />
259 <%[ Date To: ]%> <com:TDatePicker ID="DateTo" DateFormat="yyyy-MM-dd" Width="80px" />
261 <span><%[ Client: ]%></span>
262 <com:TActiveDropDownList ID="Clients" CssClass="textbox" AutoPostBack="false" Width="160px" Style="display: inline" />
263 <span><%[ Job name: ]%></span>
264 <com:TActiveDropDownList ID="Jobs" CssClass="textbox" AutoPostBack="false" Width="160px" Style="display: inline" />
265 <p><%[ Legend: ]%></p>
266 <div id="legend"></div>
267 <div id="graphs_content">
268 <script type="text/javascript">
269 var jobs = <%=$this->getJobs()%>;
272 <script type="text/javascript">
274 "graph_title": "<%[ Graph: Jobs size / Time ]%>",
275 "xaxis_title": "<%[ Time ]%>",
276 "yaxis_title": "<%[ Jobs size (GiB) ]%>"
280 PanelWindow.onShow = function() {
281 if (PanelWindow.currentWindowId === 'graphs' && typeof(graph) == "undefined") {
282 graph = new GraphClass(jobs, graph_lang, 'graphs_content', 'legend', 'time_range', '<%=$this->DateFrom->ClientID%>', '<%=$this->DateTo->ClientID%>', '<%=$this->Clients->ClientID%>', '<%=$this->Jobs->ClientID%>');
283 } else if (PanelWindow.currentWindowId === 'dashboard') {
284 Dashboard.update_all(Statistics, TEXT);
289 <p class="right bold italic"><%[ Tip: for getting zoom, please mark area on graph. ]%></p>
290 <p class="right bold italic"><%[ Tip 2: for back from zoom, please click somewhere on graph. ]%></p>
292 <div id="config" style="display: none;">
293 <div><com:Application.Web.Portlets.BaculaHosts ID="BaculaConfig" /></div>
295 <div id="users" style="display: none">
297 <a href="javascript:void(0)" id="add_user_btn"><strong><%[ Add new user ]%></strong></a>
298 <div id="add_user" style="display: none">
299 <p><%[ Username: ]%><input id="newuser" type="text" /><%[ Password: ]%><input id="newpwd" type="password" />
300 <a href="javascript:void(0)" onclick="Users.addUser()">
301 <img src="<%=$this->getPage()->getTheme()->getBaseUrl()%>/icon_ok.png" alt="<%[ Save ]%>" title="<%[ Save ]%>"/>
303 <a href="javascript:void(0)" onclick="Users.cancelAddUser()">
304 <img src="<%=$this->getPage()->getTheme()->getBaseUrl()%>/icon_err.png" alt="<%[ Close ]%>" title="<%[ Close ]%>" />
307 <com:TActiveRepeater ID="UsersList">
308 <prop:HeaderTemplate>
309 <table id="users_list" class="window-section-detail-smallrow">
311 <th><%[ User name ]%></th>
312 <th><%[ Role ]%></th>
313 <th><%[ Actions ]%></th>
315 </prop:HeaderTemplate>
317 <tr class="slide-window-element">
318 <td><%=$this->DataItem%></td>
319 <td><%=$this->User->getName() == $this->DataItem ? Prado::localize('Administrator') : Prado::localize('Normal user')%></td>
321 <a href="javascript:void(0)" <%=$this->User->getName() == $this->DataItem ? 'style="visibility: hidden"' : ''%> onclick="Users.rmUser('<%=$this->DataItem%>')"><img src="<%=$this->getPage()->getTheme()->getBaseUrl()%>/user-del.png"> <%[ Remove user ]%></a>
322 <a href="javascript:void(0)" onclick="Users.showChangePwd(this)" rel="chpwd_btn">
323 <img src="<%=$this->getPage()->getTheme()->getBaseUrl()%>/key.png" alt="" />
324 <%[ Change password ]%>
326 <span style="display: none;" rel="chpwd">
327 <input type="password" onkeydown="event.keyCode == 13 ? Users.changePwd(this, '<%=$this->DataItem%>') : (event.keyCode == 27 ? Users.cancelChangePwd(this.nextElementSibling.nextElementSibling) : '');" />
328 <a href="javascript:void(0)" onclick="Users.changePwd(this.prevousElementSibling, '<%=$this->DataItem%>')">
329 <img src="<%=$this->getPage()->getTheme()->getBaseUrl()%>/icon_ok.png" alt="<%[ Save ]%>" title="<%[ Save ]%>"/>
331 <a href="javascript:void(0)" onclick="Users.cancelChangePwd(this)">
332 <img src="<%=$this->getPage()->getTheme()->getBaseUrl()%>/icon_err.png" alt="<%[ Close ]%>" title="<%[ Close ]%>" />
338 <prop:FooterTemplate>
340 </prop:FooterTemplate>
341 </com:TActiveRepeater>
342 <p><em><%[ Please note that for each user (excluding administrator) there should exist separate Bconsole config file in form: ]%> <strong><com:TLabel ID="BconsoleCustomPath" /></strong></em></p>
343 <com:TCallback ID="UserAction" OnCallback="userAction" />
344 <script type="text/javascript">
345 var send_user_action = function(action, param, value) {
349 var user_action_callback = <%=$this->UserAction->ActiveControl->Javascript%>;
350 user_action_callback.setCallbackParameter([action, param, value].join(';'));
351 user_action_callback.dispatch();
354 enter_login: '<%[ Please enter login. ]%>',
355 invalid_login: '<%[ Invalid login value. Login may contain a-z A-Z 0-9 characters. ]%>',
356 invalid_pwd: '<%[ Password must be longer than 4 chars. ]%>'
358 Users.action_callback = send_user_action;
359 Users.validators = { user_pattern: new RegExp('^<%=BasicUserConfig::USER_PATTERN%>$') };
365 <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>
366 <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/Web/Logs/ directory. Are you sure?')%>'));" /><com:TLabel ForControl="Logging"><%[ Enable debug ]%></com:TLabel></a>
367 <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>
368 <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>
369 <com:Application.Web.Portlets.VolumesTools ID="VolumesTools" />
370 <com:Application.Web.Portlets.Console ID="Console" />
372 <div id="bottom"></div>
373 <script type="text/javascript">
376 <%=(!is_null($this->initWindowId) && !is_null($this->initElementId) ?
377 'SlideWindow.getObj("' . $this->initWindowId . 'Window").setInitElementId("' . $this->initElementId . '");'
379 <%=(!is_null($this->openWindow) ?
380 'PanelWindow.show("container");
381 $("#' . $this->openWindow . '").trigger(\'click\');
382 window.history.pushState("", "", "/");'
386 level: '<%[ level ]%>',
387 status: '<%[ status ]%>',
388 starttime: '<%[ start time ]%>'