mirror of
https://github.com/Oreolek/ifhub.club.git
synced 2024-06-28 20:45:00 +03:00
Исправлен плагин profiler
This commit is contained in:
parent
1299bf9d59
commit
1dfd965ef9
|
@ -5,8 +5,6 @@
|
|||
{/block}
|
||||
|
||||
{block name='layout_content'}
|
||||
<link rel="stylesheet" type="text/css" href="{$aTemplateWebPathPlugin.page|cat:'css/style.css'}" media="all" />
|
||||
|
||||
<h2 class="page-header">{$aLang.plugin.page.admin}</h2>
|
||||
|
||||
{if $aParams.0=='new'}
|
||||
|
|
|
@ -17,6 +17,6 @@
|
|||
</requires>
|
||||
<description>
|
||||
<lang name="default">Profiling the engine`s working.</lang>
|
||||
<lang name="russian">Профилирование работы движка LiveStreet-движка.</lang>
|
||||
<lang name="russian">Профилирование работы движка LiveStreet.</lang>
|
||||
</description>
|
||||
</plugin>
|
|
@ -27,6 +27,7 @@ return array(
|
|||
'table_count_id' => 'Number of profiles',
|
||||
'report_delete' => 'Delete',
|
||||
'report_delete_confirm' => 'Are you sure you want to delete the selected reports?',
|
||||
'no_reports' => 'No reports',
|
||||
|
||||
'dbstat_title' => 'Information on the database',
|
||||
'dbstat_count' => 'Data entries total',
|
||||
|
|
|
@ -27,12 +27,13 @@ return array(
|
|||
'table_count_id' => 'Количество профилей',
|
||||
'report_delete' => 'Удалить',
|
||||
'report_delete_confirm' => 'Вы уверены, что хотите удалить выбранные отчеты?',
|
||||
'no_reports' => 'Нет отчетов',
|
||||
|
||||
'dbstat_title' => 'Информацию о базе данных',
|
||||
'dbstat_title' => 'Информация о БД',
|
||||
'dbstat_count' => 'Всего записей',
|
||||
'dbstat_max_date' => 'Последняя дата',
|
||||
'import_label' => 'Импортировать начиная с',
|
||||
'import_notice' => 'В любом читаемом формате, напрмиер, Y-m-d H:i',
|
||||
'import_notice' => 'В любом читаемом формате, например, ГГГГ-ММ-ДД ЧЧ:ММ',
|
||||
'import_submit' => 'Импортировать в БД',
|
||||
|
||||
'report_delete_success' => 'Отчеты успешно удалены из базы данных',
|
||||
|
@ -54,7 +55,7 @@ return array(
|
|||
'filter_label_date' => 'Ограничения по дате',
|
||||
'filter_notice_per_page' => '',
|
||||
'filter_notice_time' => 'Минимальное количество секунд выполнения',
|
||||
'filter_notice_date' => 'Дата вводиться в формате 25.12.2009',
|
||||
'filter_notice_date' => 'Дата вводиться в формате ДД.ММ.ГГГГ',
|
||||
'filter_submit' => 'Отфильтровать',
|
||||
'filter_error' => 'Ошибка фильрации',
|
||||
'filter_error_date_format' => 'Указан неверный формат даты',
|
||||
|
|
|
@ -1,14 +1,16 @@
|
|||
<div class="profiler-table">
|
||||
<table class="profiler entries">
|
||||
{foreach from=$oReport->getAllEntries() item=oEntry}
|
||||
<tr class="entry_{$oReport->getId()}_all entry_{$oReport->getId()}_{$oEntry->getName()}{if $oEntry->getChildCount()!=0} has-child{/if}">
|
||||
<td align="center" width="20px">{if $oEntry->getChildCount()!=0}<img src="{$aTemplateWebPathPlugin.profiler}images/open.gif" alt="+" title="{$aLang.comment_collapse}/{$aLang.comment_expand}" class="folding lsProfiler_tree" id="tree_{$oReport->getId()}_{$oEntry->getId()}" style="margin-right:3px;"/>{/if}</td>
|
||||
<td width="5%">{$oEntry->getId()}</td>
|
||||
<td width="12%">{$oEntry->getName()}</td>
|
||||
<td width="12%" class="time">{$oEntry->getTimeFull()}</td>
|
||||
<td width="18%">{$oReport->getEntryFullShare($oEntry->getId())}% ({$oReport->getEntryShare($oEntry->getId())}%)</td>
|
||||
<td>{$oEntry->getComment()}</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
<table class="profiler entries table">
|
||||
<tbody>
|
||||
{foreach from=$oReport->getAllEntries() item=oEntry}
|
||||
<tr class="entry_{$oReport->getId()}_all entry_{$oReport->getId()}_{$oEntry->getName()}{if $oEntry->getChildCount()!=0} has-child{/if}">
|
||||
<td align="center" width="20px">{if $oEntry->getChildCount()!=0}<img src="{$aTemplateWebPathPlugin.profiler}images/open.gif" alt="+" title="{$aLang.comment_collapse}/{$aLang.comment_expand}" class="folding lsProfiler_tree" id="tree_{$oReport->getId()}_{$oEntry->getId()}" style="margin-right:3px;"/>{/if}</td>
|
||||
<td width="5%">{$oEntry->getId()}</td>
|
||||
<td width="12%">{$oEntry->getName()}</td>
|
||||
<td width="12%" class="time">{$oEntry->getTimeFull()}</td>
|
||||
<td width="18%">{$oReport->getEntryFullShare($oEntry->getId())}% ({$oReport->getEntryShare($oEntry->getId())}%)</td>
|
||||
<td>{$oEntry->getComment()}</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
|
@ -4,7 +4,7 @@
|
|||
<a href="#" class="profiler query {if $sAction=='query'}active{/if}" onclick="ls.profiler.toggleEntriesByClass('{$oReport->getId()}','query',this); return false;">{$aLang.plugin.profiler.entries_show_query} ({$oReport->getStat('query')})</a>
|
||||
|
||||
<div class="profiler-table">
|
||||
<table class="profiler entries">
|
||||
<table class="profiler entries table">
|
||||
{foreach from=$oReport->getAllEntries() item=oEntry}
|
||||
<tr class="entry_{$oReport->getId()}_all entry_{$oReport->getId()}_{$oEntry->getName()}{if $oEntry->getChildCount()!=0} child{/if}">
|
||||
<td></td>
|
||||
|
|
|
@ -1,46 +1,57 @@
|
|||
{include file='header.tpl' noShowSystemMessage=false}
|
||||
{extends file='layout.base.tpl'}
|
||||
|
||||
<script language="JavaScript" type="text/javascript">
|
||||
var DIR_PLUGIN_SKIN='{$aTemplateWebPathPlugin.profiler}';
|
||||
</script>
|
||||
{block name='layout_options'}
|
||||
{$noShowSystemMessage = false}
|
||||
{/block}
|
||||
|
||||
<script type="text/javascript" src="{$aTemplateWebPathPlugin.profiler}js/profiler.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="{$aTemplateWebPathPlugin.profiler}css/style.css" media="all" />
|
||||
{block name='layout_content'}
|
||||
<script>
|
||||
var DIR_PLUGIN_SKIN='{$aTemplateWebPathPlugin.profiler}';
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="{$aTemplateWebPathPlugin.profiler}js/profiler.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="{$aTemplateWebPathPlugin.profiler}css/style.css" media="all" />
|
||||
|
||||
<h2 class="page-header">{$aLang.plugin.profiler.reports_title}</h2>
|
||||
|
||||
<h2>{$aLang.plugin.profiler.reports_title}</h2>
|
||||
|
||||
<form action="{router page='profiler'}" method="post" id="form_report_list">
|
||||
<input type="hidden" name="security_ls_key" value="{$LIVESTREET_SECURITY_KEY}" />
|
||||
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<td width="20px"><input type="checkbox" name="" onclick="ls.tools.checkAll('form_reports_checkbox', this, true);"></td>
|
||||
<td></td>
|
||||
<td>{$aLang.plugin.profiler.table_date}</td>
|
||||
<td align="center">{$aLang.plugin.profiler.table_time_full}</td>
|
||||
<td align="center">{$aLang.plugin.profiler.table_count_id}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<form action="{router page='profiler'}" method="post" id="form_report_list">
|
||||
<input type="hidden" name="security_ls_key" value="{$LIVESTREET_SECURITY_KEY}" />
|
||||
|
||||
<tbody>
|
||||
{foreach from=$aReports item=oReport}
|
||||
<tr>
|
||||
<td><input type="checkbox" name="report_del[{$oReport.request_id}]" class="form_reports_checkbox"></td>
|
||||
<td align="center"><img src="{$aTemplateWebPathPlugin.profiler}images/open.gif" alt="+" title="{$aLang.comment_collapse}/{$aLang.comment_expand}" class="folding" id="img_{$oReport.request_id}" /></td>
|
||||
<td>{date_format date=$oReport.request_date}</td>
|
||||
<td align="center" class="time">{$oReport.time_full}</td>
|
||||
<td align="center">{$oReport.count_time_id}</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<input type="submit" name="submit_report_delete" value="{$aLang.plugin.profiler.report_delete}" onclick="return (jQuery('.form_reports_checkbox').length==0)?false:confirm('{$aLang.plugin.profiler.report_delete_confirm}');">
|
||||
</form>
|
||||
|
||||
{if $aReports}
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="20px"><input type="checkbox" name="" onclick="ls.tools.checkAll('form_reports_checkbox', this, true);"></th>
|
||||
<th></th>
|
||||
<th>{$aLang.plugin.profiler.table_date}</th>
|
||||
<th class="ta-c">{$aLang.plugin.profiler.table_time_full}</th>
|
||||
<th class="ta-c">{$aLang.plugin.profiler.table_count_id}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
{include file='paging.tpl' aPaging="$aPaging"}
|
||||
{include file='footer.tpl'}
|
||||
<tbody>
|
||||
{foreach from=$aReports item=oReport}
|
||||
<tr>
|
||||
<td><input type="checkbox" name="report_del[{$oReport.request_id}]" class="form_reports_checkbox"></td>
|
||||
<td align="center"><img src="{$aTemplateWebPathPlugin.profiler}images/open.gif" alt="+" title="{$aLang.comment_collapse}/{$aLang.comment_expand}" class="folding" id="img_{$oReport.request_id}" /></td>
|
||||
<td>{date_format date=$oReport.request_date}</td>
|
||||
<td align="center" class="time">{$oReport.time_full}</td>
|
||||
<td align="center">{$oReport.count_time_id}</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<input type="submit"
|
||||
name="submit_report_delete"
|
||||
value="{$aLang.plugin.profiler.report_delete}"
|
||||
class="button"
|
||||
onclick="return (jQuery('.form_reports_checkbox').length==0)?false:confirm('{$aLang.plugin.profiler.report_delete_confirm}');">
|
||||
{else}
|
||||
{$aLang.plugin.profiler.no_reports}
|
||||
{/if}
|
||||
</form>
|
||||
|
||||
|
||||
{include file='paging.tpl' aPaging="$aPaging"}
|
||||
{/block}
|
|
@ -1,32 +1,40 @@
|
|||
<div class="block">
|
||||
<div class="profiler-highlight">
|
||||
{$aLang.plugin.profiler.filter_highlight} ({$aLang.plugin.profiler.filter_seconds}):<br />
|
||||
<input type="text" name="profiler_filter_entries" id="profiler_filter_entries" onchange="ls.profiler.filterNode(this);" class="input-100" />
|
||||
<header class="block-header">
|
||||
<h3 class="block-title">{$aLang.plugin.profiler.filter_highlight}</h3>
|
||||
</header>
|
||||
|
||||
<div class="block-content">
|
||||
<label>{$aLang.plugin.profiler.filter_highlight} ({$aLang.plugin.profiler.filter_seconds}):</label>
|
||||
<input type="text" name="profiler_filter_entries" id="profiler_filter_entries" onchange="ls.profiler.filterNode(this);" class="width-full" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="block">
|
||||
<h3>{$aLang.plugin.profiler.dbstat_title}</h3>
|
||||
|
||||
<form action="{router page='profiler'}" method="POST" name="profiler_import_form">
|
||||
<div class="block">
|
||||
<header class="block-header">
|
||||
<h3 class="block-title">{$aLang.plugin.profiler.dbstat_title}</h3>
|
||||
</header>
|
||||
|
||||
<form action="{router page='profiler'}" method="POST" name="profiler_import_form" class="block-content">
|
||||
<p>{$aLang.plugin.profiler.dbstat_count}: <strong>{$aDatabaseStat.count}</strong><br />
|
||||
{$aLang.plugin.profiler.dbstat_max_date}: <strong>{$aDatabaseStat.max_date}</strong></p>
|
||||
{$aLang.plugin.profiler.dbstat_max_date}: <strong>{if $aDatabaseStat.max_date}{$aDatabaseStat.max_date}{else}—{/if}</strong></p>
|
||||
|
||||
<p><label for="profiler_date_import">{$aLang.plugin.profiler.import_label}:</label><br />
|
||||
<input type="text" id="profiler_date_import" name="profiler_date_import" value="{if $_aRequest.date_import}{$_aRequest.date_import}{else}{if $aDatabaseStat.max_date}{$aDatabaseStat.max_date}{else}{date_format date=$smarty.now format='Y-m-d \0\0\:\0\0\:\0\0'}{/if}{/if}" class="input-200" /><br />
|
||||
<p><label for="profiler_date_import">{$aLang.plugin.profiler.import_label}:</label>
|
||||
<input type="text" id="profiler_date_import" name="profiler_date_import" value="{if $_aRequest.date_import}{$_aRequest.date_import}{else}{if $aDatabaseStat.max_date}{$aDatabaseStat.max_date}{else}{date_format date=$smarty.now format='Y-m-d \0\0\:\0\0\:\0\0'}{/if}{/if}" class="width-full" /><br />
|
||||
<span class="note">{$aLang.plugin.profiler.import_notice}</span></p>
|
||||
|
||||
<input type="submit" name="submit_profiler_import" value="{$aLang.plugin.profiler.import_submit}" />
|
||||
<input type="submit" class="button button-primary" name="submit_profiler_import" value="{$aLang.plugin.profiler.import_submit}" />
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="block">
|
||||
<h3>{$aLang.plugin.profiler.filter_title}</h3>
|
||||
|
||||
{literal}
|
||||
<script language="JavaScript" type="text/javascript">
|
||||
|
||||
<div class="block">
|
||||
<header class="block-header">
|
||||
<h3 class="block-title">{$aLang.plugin.profiler.filter_title}</h3>
|
||||
</header>
|
||||
|
||||
<script>
|
||||
function eraseFilterForm() {
|
||||
jQuery("#profiler_filter_per_page, #profiler_filter_time, #profiler_filter_start, #profiler_filter_end").each(
|
||||
function(k,v){
|
||||
|
@ -35,25 +43,26 @@
|
|||
);
|
||||
return false;
|
||||
}
|
||||
</script>
|
||||
{/literal}
|
||||
</script>
|
||||
|
||||
|
||||
<form action="{router page='profiler'}" method="GET" name="profiler_filter_form">
|
||||
<p><label for="profiler_filter_start">{$aLang.plugin.profiler.filter_label_date}:</label><br />
|
||||
<form action="{router page='profiler'}" method="GET" name="profiler_filter_form" class="block-content">
|
||||
<p><label for="profiler_filter_start">{$aLang.plugin.profiler.filter_label_date}:</label>
|
||||
<input type="text" id="profiler_filter_start" name="start" value="{$_aRequest.start}" style="width: 43%" readonly="readonly" class="date-picker"/> —
|
||||
<input type="text" id="profiler_filter_end" name="end" value="{$_aRequest.end}" style="width: 43%" readonly="readonly" class="date-picker"/><br />
|
||||
<span class="note">{$aLang.plugin.profiler.filter_notice_date}</span></p>
|
||||
|
||||
<p><label for="profiler_filter_time">{$aLang.plugin.profiler.filter_label_time}:</label><br />
|
||||
<input type="text" id="profiler_filter_time" name="time" value="{$_aRequest.time}" class="input-100" /><br />
|
||||
<p><label for="profiler_filter_time">{$aLang.plugin.profiler.filter_label_time}:</label>
|
||||
<input type="text" id="profiler_filter_time" name="time" value="{$_aRequest.time}" class="width-200" /><br />
|
||||
<span class="note">{$aLang.plugin.profiler.filter_notice_time}</span></p>
|
||||
|
||||
<p><label for="profiler_filter_per_page">{$aLang.plugin.profiler.filter_label_per_page}:</label><br />
|
||||
<input type="text" id="profiler_filter_per_page" name="per_page" value="{if $_aRequest.per_page}{$_aRequest.per_page}{else}{cfg name='module.profiler.per_page'}{/if}" class="input-200" /></p>
|
||||
<p><label for="profiler_filter_per_page">{$aLang.plugin.profiler.filter_label_per_page}:</label>
|
||||
<input type="text" id="profiler_filter_per_page" name="per_page" value="{if $_aRequest.per_page}{$_aRequest.per_page}{else}{cfg name='module.profiler.per_page'}{/if}" class="width-200" /></p>
|
||||
|
||||
<input type="submit" name="submit_profiler_filter" value="{$aLang.plugin.profiler.filter_submit}"/>
|
||||
<input type="submit" class="button button-primary" name="submit_profiler_filter" value="{$aLang.plugin.profiler.filter_submit}"/>
|
||||
</form>
|
||||
|
||||
<div class="bottom"><a href="#" onclick="return eraseFilterForm();">{$aLang.plugin.profiler.filter_erase_form}</a> | <a href="{router page='profiler'}">{$aLang.plugin.profiler.filter_erase}</a></div>
|
||||
<footer class="block-footer">
|
||||
<a href="#" onclick="return eraseFilterForm();" class="link-dotted">{$aLang.plugin.profiler.filter_erase_form}</a> |
|
||||
<a href="{router page='profiler'}">{$aLang.plugin.profiler.filter_erase}</a>
|
||||
</footer>
|
||||
</div>
|
|
@ -1 +1 @@
|
|||
a.profiler { margin: 2px; padding: 4px 5px; text-decoration: none; }
a.profiler.active { background: #333; color: #fff; }
.profiler.entries { margin-top: 5px; }
.profiler-table .has-child { background: #f4f4f4; }
.profiler-table .filter { background: #dafad8; }
.profiler-highlight { color: #4bb23b; }
|
||||
a.profiler { margin: 2px; padding: 4px 5px; text-decoration: none; }
a.profiler.active { background: #333; color: #fff; }
.profiler.entries { margin-top: 5px; }
.profiler-table .has-child { background: #f4f4f4; }
.profiler-table .filter { background: #dafad8; }
|
Loading…
Reference in a new issue