Skip to content
This repository has been archived by the owner on Feb 13, 2018. It is now read-only.

Commit

Permalink
. #19 대시보드에 그래프 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
YJSoft committed Oct 16, 2014
1 parent 33330fe commit 122f2b2
Show file tree
Hide file tree
Showing 2 changed files with 84 additions and 3 deletions.
6 changes: 6 additions & 0 deletions profiler.admin.view.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ function init()

function dispProfilerAdminDashboard()
{
$oProfilerAdminModel = getAdminModel('profiler');
$a_slowlog = $oProfilerAdminModel->getStaticsSlowlog('addon');
$t_slowlog = $oProfilerAdminModel->getStaticsSlowlog('trigger');

Context::set('a_slowlog', $a_slowlog);
Context::set('t_slowlog', $t_slowlog);
}

function dispProfilerAdminConfig()
Expand Down
81 changes: 78 additions & 3 deletions tpl/dashboard.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,85 @@
<!--// HEADER -->
<include target="./_header.html" />

<load target="./js/highcharts/highcharts.js" />
<script>
jQuery(function($) {
$('#slowlog-trigger-graph').highcharts({
chart: {
plotBackgroundColor: null,
plotBorderWidth: null,//null,
plotShadow: false
},
title: {
text: '트리거'
},
tooltip: {
pointFormat: '{series.name}: <b>{point.y:.2f}초</b>'
},
plotOptions: {
pie: {
allowPointSelect: true,
cursor: 'pointer',
dataLabels: {
enabled: false,
format: '<b>{point.name}</b>: {point.y:.2f} 초',
style: {
color: (Highcharts.theme && Highcharts.theme.contrastTextColor) || 'black'
}
},
showInLegend: false
}
},
series: [{
type: 'pie',
name: '실행 시간',
data: [
<block loop="$t_slowlog->data => $log">
['{$log->called}', {$log->avg_time}],
</block>
]
}]
});
$('#slowlog-addon-graph').highcharts({
chart: {
plotBackgroundColor: null,
plotBorderWidth: null,//null,
plotShadow: false
},
title: {
text: '애드온'
},
tooltip: {
pointFormat: '{series.name}: <b>{point.y:.2f}초</b>'
},
plotOptions: {
pie: {
allowPointSelect: true,
cursor: 'pointer',
dataLabels: {
enabled: false,
},
showInLegend: false
}
},
series: [{
type: 'pie',
name: '실행 시간',
data: [
<block loop="$a_slowlog->data => $log">
['{$log->called}', {$log->avg_time}],
</block>
]
}]
});
});
</script>
<!--// BODY -->
<div class="x_clearfix">
<div class="x_span8">
<div id="slowlog-graph" style="height:300px">슬로우로그 그래프</div>
<div class="x_span4">
<div id="slowlog-trigger-graph" style="height:300px">트리거 그래프</div>
</div>
<div class="x_span4">
<div id="slowlog-addon-graph" style="height:300px">애드온 그래프</div>
</div>
<div class="x_span4">
안내문...
Expand Down

0 comments on commit 122f2b2

Please sign in to comment.