INIT: initial commit
This commit is contained in:
@@ -0,0 +1,111 @@
|
||||
@extends('admin.layoutWithNavigation')
|
||||
|
||||
@section('pageHeading', trans('profiler::module.requestDetail'))
|
||||
|
||||
@section('headerButtons')
|
||||
<a class="btn btn-sm rounded btn-primary" href="{{route('profiler.index')}}"><i class="fa fa-list"></i></a>
|
||||
<div class="pull-right">
|
||||
@foreach(['0' => 'today', '7' => 'days', '30' => 'days', 'inf' => 'overall'] as $pastDay => $name)
|
||||
@php $filter['httpLog'] = $httpLog ;$filter['pastDays'] = $pastDay; @endphp
|
||||
|
||||
<a class="btn btn-sm rounded @if($pastDays === (string)$pastDay) btn-primary @else btn-secondary @endif"
|
||||
href="{{route('request.detail', $filter)}}">{{trans_choice('profiler::module.index.pastDays.'.$name, $pastDay)}}</a>
|
||||
@endforeach
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
|
||||
|
||||
@section('content')
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-5">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<div class="header-block">
|
||||
<p class="title">@lang('profiler::module.request.detail')</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-block">
|
||||
<div class="row">
|
||||
<ul>
|
||||
<li>@lang('profiler::module.index.httpMethod'): {{$httpLog->method}}</li>
|
||||
<li>@lang('profiler::module.index.url'): <a
|
||||
href="{{route('profiler.index', ['url' => $httpLog->url])}}">{{$httpLog->url}}</a>
|
||||
</li>
|
||||
<li>@lang('profiler::module.index.time'): {{number_format($httpLog->time, 2)}} ms</li>
|
||||
<li>@lang('profiler::module.index.systemLoad'): {{$httpLog->load_1}}, {{$httpLog->load_5}}
|
||||
, {{$httpLog->load_15}}</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="row text-center">
|
||||
<div class="col-sm-3"><h5>
|
||||
{{count($sameRequests)}} ×</h5> @lang('profiler::module.index.calledTotal')</div>
|
||||
<div class="col-sm-3"><h5>{{number_format($times['min'], 2)}}
|
||||
ms</h5> @lang('profiler::module.index.timeMin')</div>
|
||||
<div class="col-sm-3"><h5>{{number_format($times['max'], 2)}}
|
||||
ms</h5> @lang('profiler::module.index.timeMax')</div>
|
||||
<div class="col-sm-3"><h5>{{number_format($times['avg'], 2)}}
|
||||
ms</h5> @lang('profiler::module.index.timeAvg')</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-7">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<div class="header-block">
|
||||
<p class="title">@lang('profiler::module.graphs.responseTime')</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-block">
|
||||
<canvas id="responseTimeHistory" height="100"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<div class="header-block">
|
||||
<p class="title">@lang('profiler::module.request.sameRequests')</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-block">
|
||||
@include('profiler::_partials.requestList', ['requests' => $sameRequests])
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@endsection
|
||||
|
||||
@section('javascripts')
|
||||
<script>
|
||||
var ctx = $ ("#responseTimeHistory");
|
||||
var myChart = new Chart (ctx, {
|
||||
type: 'bubble',
|
||||
data: {
|
||||
datasets: [
|
||||
{
|
||||
label: '@lang('profiler::module.graphs.responseTime')',
|
||||
data: [
|
||||
@foreach($sameRequests as $i => $request)
|
||||
{
|
||||
x: '{{$i}}',
|
||||
y: '{{number_format($request->time, 2)}}',
|
||||
r: 5
|
||||
},
|
||||
@endforeach
|
||||
|
||||
],
|
||||
backgroundColor: "#413e39",
|
||||
hoverBackgroundColor: "#515151",
|
||||
}]
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
Reference in New Issue
Block a user