1 {include file="page_header.tpl"}
4 <script language="Javascript" type="text/javascript">
8 for (var i=0; i<document.qlist.elements.length; i++)
10 var e = document.qlist.elements[i];
11 if (e.type == 'checkbox' && e.name != 'allbox')
12 e.checked = document.qlist.allbox.checked;
16 function CheckToggle(checkname)
18 checkname.checked = !checkname.checked;
23 function TimerDown(secs)
29 function TimerDisplay(secs)
31 timer_min = Math.floor(secs / 60);
32 timer_sec = secs % 60;
34 if (timer_min < 10) timer_min = '0'+ timer_min;
35 if (timer_sec < 10) timer_sec = '0'+ timer_sec;
37 return timer_min+':'+timer_sec;
45 document.fcounter.counter.value = TimerDisplay(total_secs);
46 down=setTimeout("CountDown()",1000);
50 function toggleBox(mybox1, mybox2)
54 if (document.all.item(mybox1).style.display == "none")
56 document.all.item(mybox1).style.display = "";
57 document.all.item(mybox2).style.display = "none";
61 document.all.item(mybox2).style.display = "";
62 document.all.item(mybox1).style.display = "none";
67 if (document.getElementById(mybox1).style.display == "none")
69 document.getElementById(mybox1).style.display = "";
70 document.getElementById(mybox2).style.display = "none";
74 document.getElementById(mybox2).style.display = "";
75 document.getElementById(mybox1).style.display = "none";
80 function openWindow(w_uri, w_title)
82 window.open(w_uri, w_title, 'width=800,height=600,directories=no,location=no,menubar=no,resizable=yes,scrollbars=no,status=no,toolbar=no');
91 <table width="100%" border="0" cellpadding="0" cellspacing="10">
93 <td align="left" valign="top" width="150px">
95 {if $tool_domain_selected && $tool_shard_selected}
96 <table width="100%" border="0" cellpadding="1" bgcolor="#cccccc" class="view">
98 <th colspan="10">Refresh</th>
100 <form action="index.php?domain={$tool_domain_selected}&shard={$tool_shard_selected}" method="post" name="fcounter">
103 <select name="services_refresh" style="width:100%;" onchange="this.form.submit();">
104 {section name=refresh loop=$tool_refresh_list}
105 <option value="{$tool_refresh_list[refresh].secs}" {if $tool_refresh_rate == $tool_refresh_list[refresh].secs}selected{/if}>{$tool_refresh_list[refresh].desc}</option>
110 {if $tool_refresh_rate > 0}
113 <input type="text" name="counter" value="" readonly class="refresh_counter">
114 <script language="Javascript" type="text/javascript">
116 TimerDown({$tool_refresh_rate});
127 <table width="100%" border="0" cellpadding="1" bgcolor="#cccccc" class="view">
129 <th colspan="10">Domains</th>
131 {section name=domain loop=$tool_domain_list}
133 <td align="center" class="{if $tool_domain_selected == $tool_domain_list[domain].domain_id}domainlistselected{else}domainlist{/if}"><a href="index.php?domain={$tool_domain_list[domain].domain_id}">{$tool_domain_list[domain].domain_name}</a></td>
138 {if $tool_domain_selected}
140 <table width="100%" border="0" cellpadding="1" bgcolor="#cccccc" class="view">
142 <th colspan="10">Shards</th>
144 {section name=shard loop=$tool_shard_list}
145 {if $tool_domain_selected == $tool_shard_list[shard].shard_domain_id}
147 <td align="center" class="{if $tool_shard_selected == $tool_shard_list[shard].shard_id}shardlistselected{else}shardlist{/if}"><a href="index.php?domain={$tool_domain_selected}&shard={$tool_shard_list[shard].shard_id}">{$tool_shard_list[shard].shard_name}</a></td>
154 {if $restriction_tool_notes && $tool_note_list}
156 <table width="100%" border="0" cellpadding="1" bgcolor="#cccccc" class="view">
158 <th colspan="10">Notes</th>
160 {section name=note loop=$tool_note_list}
162 {if $tool_note_list[note].note_mode == 0}
163 <td align="center"><a href="javascript:void(0);" onclick="return overlib('{$tool_note_list[note].note_data}', WIDTH, 250, STICKY, DRAGGABLE, CAPTION, '{$tool_note_list[note].note_title2}', CENTER, CLOSECLICK, ANCHOR, 'ol_anchor_right', ANCHORALIGN, 'LL', 'UR');" onmouseout="nd();">{$tool_note_list[note].note_title}</a></td>
164 {elseif $tool_note_list[note].note_mode == 1}
165 <td align="center"><a href="javascript:openWindow('{$tool_note_list[note].note_popup_uri}','{$tool_note_list[note].note_title}');">{$tool_note_list[note].note_title}</a></td>
174 <table width="100%" border="0" cellpadding="1" bgcolor="#cccccc" class="view">
176 <th colspan="10">HardDrives</th>
178 {section name=hd loop=$tool_hd_list}
179 {if $tool_hd_list[hd].hd_percent >= 85}{assign var="hdtrclass" value="row_red"}
180 {elseif $tool_hd_list[hd].hd_percent >= 75}{assign var="hdtrclass" value="row_orange_light"}
181 {else}{assign var="hdtrclass" value="row0"}{/if}
182 <tr class="{$hdtrclass}">
183 <td align="left" ><a href="javascript:void(0);" onmouseover="return overlib('{$tool_hd_list[hd].summary}', OFFSETX, 40, OFFSETY, 10);" onmouseout="return nd();">{$tool_hd_list[hd].hd_server}</a></td>
184 <td align="right">{$tool_hd_list[hd].hd_percent}%</td>
188 <th colspan="10"><small>{$tool_hd_time|date_format:"%Y/%m/%d %H:%M:%S"}</small></th>
195 <td width="10px"> </td>
197 <td align="right" valign="top">
198 {if $tool_domain_selected && $tool_shard_selected}
199 <table width="100%" border="0" cellpadding="1" bgcolor="#cccccc" class="view">
200 <form action="index.php" method="post">
201 {if $tool_annotation_info || $tool_has_lock}
203 <th width="10%">Annotation</th>
204 <td><input type="text" name="annotation" value="{$tool_annotation_info.annotation_data}" maxlength="255" size="80" {if !$tool_has_lock}readonly{/if}> {if $tool_has_lock}<input type="submit" name="lock" value="update annotation">{/if}
205 {if $tool_annotation_info}
206 ({$tool_annotation_info.annotation_user_name} @ {$tool_annotation_info.annotation_date|date_format:"%Y/%m/%d %H:%M:%S"})
212 <th width="10%">Lock</th>
215 {* if (!$tool_lock_info || $tool_lock_info.lock_shard_id) && !$tool_cant_lock && ($tool_shard_restart_status == 0) && !$tool_no_domain_lock *}
216 {if (!$tool_lock_info || $tool_lock_info.lock_shard_id) && !$tool_cant_lock && !$tool_no_domain_lock}
217 {if $restriction_tool_main_lock_shard}<input type="submit" name="lock" value="lock shard">{/if}
219 Lock unavailable, a restart sequence is active !
221 {if ($tool_shard_restart_status == 0) && ($tool_domain_has_shard_restart == 0)}
222 {if $restriction_tool_main_lock_domain}<input type="submit" name="lock" value="lock domain">{/if}
224 {elseif $tool_has_shard_lock}
225 {if $tool_shard_restart_status == 0}
226 <input type="submit" name="lock" value="unlock shard">
228 {if ($tool_shard_restart_status == 0) && ($tool_domain_has_shard_restart == 0)}
229 {if $restriction_tool_main_lock_domain}<input type="submit" name="lock" value="lock domain">{/if}
230 {elseif $tool_shard_restart_status > 0}
231 Restart Sequence is active !
234 {if $restriction_tool_main_easy_restart && ($tool_shard_restart_status == 0)}
235 <input type="submit" name="lock" value="restart sequence" class="restart" onclick="if (confirm('Are you sure you want to engage the RESTART SEQUENCE for this shard ?')) return true; return false;">
236 <input type="hidden" name="restart_ws_state" value="{$tool_restart_ws_state}">
239 {elseif $tool_has_domain_lock}
240 <input type="submit" name="lock" value="unlock domain">
243 {if $tool_lock_info.lock_domain_id} Domain{elseif $tool_lock_info.lock_shard_id} Shard{/if}
244 Locked by <b>{$tool_lock_info.lock_user_name}</b> @ {$tool_lock_info.lock_date|date_format:"%Y/%m/%d %H:%M:%S"}
256 {if !$tool_domain_selected}
257 <table width="100%" border="0" cellpadding="1" bgcolor="#cccccc" class="view">
259 <td class="row0">You need to select a domain.</td>
262 {elseif !$tool_shard_selected}
263 <table width="100%" border="0" cellpadding="1" bgcolor="#cccccc" class="view">
265 <td class="row0">You need to select a shard.</td>
268 {elseif $tool_domain_error}
269 <table width="100%" border="0" cellpadding="1" bgcolor="#cccccc" class="view">
271 <td class="row0"><span class="alert">{$tool_domain_error}</span></td>
276 <table width="100%" border="0" cellpadding="1" bgcolor="#cccccc" class="view">
278 <td class="row0"><span class="alert">{$tool_as_error}</span></td>
283 <form action="index.php" method="post" name="qlist">
284 <table width="100%" border="0" cellpadding="1" bgcolor="#cccccc" class="view">
286 <td class="heads"><input class="check" type="checkbox" name="allbox" value="1" onclick="CheckAll();"></td>
287 <td class="heads">AliasName</td>
289 <td class="heads">Shard</td>
290 {*<td class="heads">LongName</td>*}
291 <td class="heads">ShortName</td>
292 {*<td class="heads">ServiceAlias</td>*}
293 <td class="heads">Hostname</td>
294 <td class="heads">Running State</td>
295 <td class="heads">Running Orders</td>
296 <td class="heads">Running Tags</td>
298 <td class="heads">State</td>
299 <td class="heads">Rep</td>
300 <td class="heads">Start Cntrs</td>
302 <td class="heads">User SL</td>
304 <td class="heads">Tick SL</td>
305 <td class="heads">Mem</td>
306 <td class="heads">Nb Play</td>
307 <td class="heads">UpTime</td>
309 {section name=service loop=$tool_services_list}
310 {assign var="service_shard_id" value=$tool_services_list[service].ShardName}
311 {if $tool_shard_filters.$service_shard_id || $tool_shard_filters._all_ || ($tool_shard_filters._unknown_ && !$tool_services_list[service].ShardName)}
312 {cycle assign="trclass" values="row0,row1"}
313 {assign var="tdclass1" value=""}
314 {assign var="tdclass2" value=""}
315 {if $tool_services_list[service]._flags_.rs_stopped}{assign var="tdclass1" value="class=\"cell_inactive1\""}{assign var="tdclass2" value="class=\"cell_inactive2\""}{assign var="trclass" value="row_stopped"}{/if}
316 {if $tool_services_list[service]._flags_.rs_starting}{* assign var="tdclass1" value="class=\"cell_inactive1\"" *}{assign var="tdclass2" value="class=\"cell_inactive2\""}{assign var="trclass" value="row_starting"}{/if}
317 {if $tool_services_list[service]._flags_.alert_red && ($tool_services_list[service]._flags_.rs_starting || $tool_services_list[service]._flags_.rs_online)}{assign var="trclass" value="row_red"}
318 {elseif $tool_services_list[service]._flags_.alert_orange_dark && ($tool_services_list[service]._flags_.rs_starting || $tool_services_list[service]._flags_.rs_online)}{assign var="trclass" value="row_orange_dark"}
319 {elseif $tool_services_list[service]._flags_.alert_orange_light && ($tool_services_list[service]._flags_.rs_starting || $tool_services_list[service]._flags_.rs_online)}{assign var="trclass" value="row_orange_light"}{/if}
320 {assign var="check_name" value=$tool_services_list[service].AliasName}
321 <tr class="{$trclass}">
322 <td><input class="check" type="checkbox" name="service_{$tool_services_list[service].AliasName}" value="{$tool_services_list[service].AliasName}" {if $tool_service_select_list.$check_name}checked{/if}></td>
323 <td onclick="CheckToggle(document.qlist.service_{$tool_services_list[service].AliasName})" {$tdclass1}>{$tool_services_list[service].AliasName}</td>
325 <td onclick="CheckToggle(document.qlist.service_{$tool_services_list[service].AliasName})" {$tdclass1}>{if $tool_services_list[service].ShardName != ""}{$tool_services_list[service].ShardName}{else}?{/if}{if $tool_services_list[service].ShardId != ""}/{$tool_services_list[service].ShardId}{/if}</td>
326 {*<td>{$tool_services_list[service].LongName}</td>*}
327 <td onclick="CheckToggle(document.qlist.service_{$tool_services_list[service].AliasName})" {$tdclass1}>{$tool_services_list[service].ShortName}</td>
328 {*<td>{$tool_services_list[service].ServiceAlias}</td>*}
329 <td onclick="CheckToggle(document.qlist.service_{$tool_services_list[service].AliasName})" {$tdclass1}>{$tool_services_list[service].Hostname}</td>
330 <td onclick="CheckToggle(document.qlist.service_{$tool_services_list[service].AliasName})" {$tdclass1}>{$tool_services_list[service].RunningState}</td>
331 <td onclick="CheckToggle(document.qlist.service_{$tool_services_list[service].AliasName})" {$tdclass1}>{$tool_services_list[service].RunningOrders}</td>
332 <td onclick="CheckToggle(document.qlist.service_{$tool_services_list[service].AliasName})" {$tdclass1}>{$tool_services_list[service].RunningTags}</td>
334 <td onclick="CheckToggle(document.qlist.service_{$tool_services_list[service].AliasName})" {$tdclass2}>{$tool_services_list[service].State}</td>
335 <td onclick="CheckToggle(document.qlist.service_{$tool_services_list[service].AliasName})" {$tdclass2}>{$tool_services_list[service].NoReportSince}</td>
336 <td onclick="CheckToggle(document.qlist.service_{$tool_services_list[service].AliasName})" {$tdclass2}>{$tool_services_list[service].StartCounter}</td>
338 <td onclick="CheckToggle(document.qlist.service_{$tool_services_list[service].AliasName})" {$tdclass2}>{$tool_services_list[service].UserSpeedLoop}</td>
340 <td onclick="CheckToggle(document.qlist.service_{$tool_services_list[service].AliasName})" {$tdclass2}>{$tool_services_list[service].TickSpeedLoop}</td>
341 <td onclick="CheckToggle(document.qlist.service_{$tool_services_list[service].AliasName})" {$tdclass2}>{$tool_services_list[service].ProcessUsedMemory}</td>
342 <td onclick="CheckToggle(document.qlist.service_{$tool_services_list[service].AliasName})" {$tdclass2}>{$tool_services_list[service].NbPlayers}</td>
343 <td nowrap onclick="CheckToggle(document.qlist.service_{$tool_services_list[service].AliasName})" {$tdclass2}>{$tool_services_list[service].UpTime}</td>
349 <!-- ugly trick to block the first submit button being triggered when hitting ENTER to send the form -->
350 <div style="display: none;"><input type="submit" name="fake" value="fake" onclick="alert('PLEASE DO NOT USE THE <ENTER> KEY !'); return false;"></div>
351 <!-- end ugly trick :) -->
353 {if $restriction_tool_main_easy_restart && ($tool_shard_restart_status > 0)}
355 {include file="index_restart_sequence.tpl"}
359 {* if $restriction_tool_main_ws *}
361 <table width="100%" border="0" cellpadding="1" bgcolor="#cccccc" class="view">
363 <td align="right" width="100px"><b>WS : </b>{if $restriction_tool_main_ws_old && $restriction_tool_main_ws}<br><small><a href="javascript:toggleBox('ws_old','ws_new');">new/old</a></small>{/if}</td>
365 {if $restriction_tool_main_ws_old && $restriction_tool_main_ws}
366 <div id="ws_old" style="display: none;">
368 <input type="submit" name="services_update" value="open ws" onclick="if (confirm('Are you sure you want to OPEN the selected WS services ?')) return true; return false;">
369 <input type="submit" name="services_update" value="lock ws" onclick="if (confirm('Are you sure you want to LOCK the selected WS services ?')) return true; return false;">
370 <input type="submit" name="services_update" value="close ws" onclick="if (confirm('Are you sure you want to CLOSE the selected WS services ?')) return true; return false;">
374 <table width="100%" border="0" cellpadding="1">
375 {if $restriction_tool_main_ws}
376 <input type="hidden" name="ws_su" value="{$tool_shard_su_name}">
377 <input type="hidden" name="ws_shard_name" value="">
378 <input type="hidden" name="ws_shard_id" value="">
380 {section name=shard loop=$tool_shard_run_list}
381 {assign var="sname" value=$tool_shard_run_list[shard]}
382 {if $tool_shard_infos[$sname] && $tool_shard_su_name}
384 <td width="10%"> <b>{$tool_shard_run_list[shard]}</b></td>
386 <select name="ws_state_{$sname}" {if !$restriction_tool_main_ws}disabled{/if}>
387 {section name=state loop=$tool_shard_ws_states}
388 <option class="ws_{$tool_shard_ws_states[state]}" value="{$tool_shard_ws_states[state]}" {if $tool_shard_infos[$sname].state == $tool_shard_ws_states[state]}selected{/if}>{$tool_shard_ws_states[state]}</option>
391 <td width="20%"><input type="text" name="ws_motd_{$sname}" value="{$tool_shard_infos[$sname].motd}" maxlength="255" size="40" {if !$restriction_tool_main_ws}disabled{/if}></td>
393 {if $restriction_tool_main_ws}
394 <input type="submit" name="ws_update" value="update WS" onclick="if (confirm('Are you sure you want to change the WS State for shard <{$sname}> ?')) {ldelim} this.form.ws_shard_name.value='{$sname}'; this.form.ws_shard_id.value='{$tool_shard_infos[$sname].shard_id}'; return true; {rdelim} else {ldelim} return false; {rdelim}">
408 {if $restriction_tool_main_start || $restriction_tool_main_stop || $restriction_tool_main_restart || $restriction_tool_main_kill || $restriction_tool_main_abort || $restriction_tool_main_reset_counters || $restriction_tool_main_service_autostart}
410 <table width="100%" border="0" cellpadding="1" bgcolor="#cccccc" class="view">
412 <td align="right" width="100px"><b>Services : </b></td>
414 {if $restriction_tool_main_start}
415 <input type="submit" name="services_update" value="start" onclick="if (confirm('Are you sure you want to START the selected services ?')) return true; return false;">
417 {if $restriction_tool_main_stop}
418 <input type="submit" name="services_update" value="stop" onclick="if (confirm('Are you sure you want to STOP the selected services ?')) return true; return false;">
420 {if $restriction_tool_main_restart}
421 <input type="submit" name="services_update" value="restart" onclick="if (confirm('Are you sure you want to RESTART the selected services ?')) return true; return false;">
423 {if $restriction_tool_main_kill}
424 <input type="submit" name="services_update" value="kill" onclick="if (confirm('Are you sure you want to KILL the selected services ?')) return true; return false;">
426 {if $restriction_tool_main_abort}
427 <input type="submit" name="services_update" value="abort" onclick="if (confirm('Are you sure you want to ABORT the selected services ?')) return true; return false;">
429 {if $restriction_tool_main_service_autostart}
430 <input type="submit" name="services_update" value="activate" onclick="if (confirm('Are you sure you want to ACTIVATE the selected services ?')) return true; return false;">
431 <input type="submit" name="services_update" value="deactivate" onclick="if (confirm('Are you sure you want to DEACTIVATE the selected services ?')) return true; return false;">
433 {if $restriction_tool_main_reset_counters}
434 <input type="submit" name="services_update" value="reset counters" onclick="if (confirm('Are you sure you want to RESET START COUNTERS on the selected services (AES only) ?')) return true; return false;">
441 {if $restriction_tool_main_shard_autostart && $tool_shard_run_list}
443 <table width="100%" border="0" cellpadding="1" bgcolor="#cccccc" class="view">
445 <td align="right" width="100px"><b>Shards : </b></td>
446 <td><table width="100%" border="0" cellpadding="1">
447 <input type="hidden" name="shards_update_name" value="">
448 {section name=shard loop=$tool_shard_run_list}
449 {assign var="sname" value=$tool_shard_run_list[shard]}
451 <td width="10%"> <b>{$tool_shard_run_list[shard]}</b></td>
452 <td width="10%">{if $sname != ""}<span class="{$tool_shard_orders[$sname]}">{$tool_shard_orders[$sname]|replace:'_':' '}</span>{/if} </td>
454 <input type="submit" name="shards_update" value="auto restart on" onclick="if (confirm('Are you sure you want to set AUTO RESTART ON for shard <{$tool_shard_run_list[shard]}> ?')) {ldelim} this.form.shards_update_name.value='{$tool_shard_run_list[shard]}'; return true; {rdelim} else {ldelim} return false; {rdelim}">
455 <input type="submit" name="shards_update" value="auto restart off" onclick="if (confirm('Are you sure you want to set AUTO RESTART OFF for shard <{$tool_shard_run_list[shard]}> ?')) {ldelim} this.form.shards_update_name.value='{$tool_shard_run_list[shard]}'; return true; {rdelim} else {ldelim} return false; {rdelim}">
464 {if $restriction_tool_main_execute}
466 <table width="100%" border="0" cellpadding="1" bgcolor="#cccccc" class="view">
468 <td align="right" width="100px"><b>Command : </b></td>
469 <td> <input type="text" name="service_command" value="{$tool_execute_command}" size="50">
470 <input type="submit" name="services_update" value="execute" {* onclick="if (confirm('Are you sure you want to EXECUTE this command on the selected services ?')) return true; return false;" *}>
475 {if $tool_execute_command}
477 <table width="100%" border="0" cellpadding="1" bgcolor="#cccccc" class="view">
479 <th>Command Results for '{$tool_execute_command}' :</th>
482 <td><textarea width="100%" rows="50" class="command" readonly >{section name=exe loop=$tool_execute_result}{$tool_execute_result[exe]}{/section}</textarea></td>
488 {* end of: if $restriction_tool_main_easy_restart && ($tool_shard_restart_status > 0) *}
498 {include file="page_footer.tpl"}