mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-09 23:24:06 -08:00
Updated dashboard to use new API activity report and added category summary
This commit is contained in:
parent
6775c39a5e
commit
76926c97c1
|
@ -92,22 +92,26 @@
|
|||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="table-responsive">
|
||||
|
||||
<table
|
||||
class="table table-striped"
|
||||
class="table table-striped snipe-table"
|
||||
name="activityReport"
|
||||
id="table"
|
||||
data-url="{{route('api.activity.list', ['limit' => 20]) }}">
|
||||
data-cookie="false"
|
||||
data-cookie-id-table="dashTable-{{ config('version.hash_version') }}"
|
||||
data-url="{{route('api.activity.list', ['limit' => 25]) }}">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-field="icon" style="width: 40px;" class="hidden-xs"></th>
|
||||
<th class="col-sm-2" data-field="created_at">{{ trans('general.date') }}</th>
|
||||
<th class="col-sm-2" data-field="admin">{{ trans('general.admin') }}</th>
|
||||
<th data-field="icon" style="width: 40px;" class="hidden-xs" data-formatter="iconFormatter"></th>
|
||||
<th class="col-sm-3" data-field="created_at" data-formatter="dateDisplayFormatter">{{ trans('general.date') }}</th>
|
||||
<th class="col-sm-2" data-field="admin" data-formatter="usersLinkObjFormatter">{{ trans('general.admin') }}</th>
|
||||
<th class="col-sm-2" data-field="action_type">{{ trans('general.action') }}</th>
|
||||
<th class="col-sm-4" data-field="item">{{ trans('general.item') }}</th>
|
||||
<th class="col-sm-3" data-field="item">{{ trans('general.item') }}</th>
|
||||
<th class="col-sm-2" data-field="target">{{ trans('general.target') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
|
||||
</div><!-- /.responsive -->
|
||||
</div><!-- /.col -->
|
||||
</div><!-- /.row -->
|
||||
|
@ -115,9 +119,30 @@
|
|||
</div><!-- /.box -->
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="box box-default">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ trans('general.assets') }}</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
<div class="box-body">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="chart-responsive">
|
||||
<canvas id="statusPieChart" height="150"></canvas>
|
||||
</div> <!-- ./chart-responsive -->
|
||||
</div> <!-- /.col -->
|
||||
</div> <!-- /.row -->
|
||||
</div><!-- /.box-body -->
|
||||
</div> <!-- /.box -->
|
||||
|
||||
<!-- Categories -->
|
||||
<div class="box box-default">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ trans('general.assets') }}</h3>
|
||||
<h3 class="box-title">Asset {{ trans('general.categories') }}</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i>
|
||||
</button>
|
||||
|
@ -127,9 +152,20 @@
|
|||
<div class="box-body">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="chart-responsive">
|
||||
<canvas id="statusPieChart" height="150"></canvas>
|
||||
</div> <!-- ./chart-responsive -->
|
||||
<table
|
||||
class="table table-striped snipe-table"
|
||||
name="categorySummary"
|
||||
id="table"
|
||||
data-cookie="false"
|
||||
data-cookie-id-table="categorySummary-{{ config('version.hash_version') }}"
|
||||
data-url="{{ route('api.categories.index', ['limit' => 15]) }}">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-sm-2" data-field="name" data-formatter="categoriesLinkFormatter">{{ trans('general.name') }}</th>
|
||||
<th class="col-sm-2" data-field="assets_count"><i class="fa fa-barcode"></i></th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div> <!-- /.col -->
|
||||
</div> <!-- /.row -->
|
||||
</div><!-- /.box-body -->
|
||||
|
@ -139,8 +175,10 @@
|
|||
|
||||
@stop
|
||||
|
||||
|
||||
@section('moar_scripts')
|
||||
@include ('partials.bootstrap-table', ['simple_view' => true])
|
||||
|
||||
|
||||
<script src="{{ asset('assets/js/plugins/chartjs/Chart.min.js') }}"></script>
|
||||
<script>
|
||||
var pieChartCanvas = $("#statusPieChart").get(0).getContext("2d");
|
||||
|
@ -174,22 +212,5 @@
|
|||
|
||||
</script>
|
||||
|
||||
<script src="{{ asset('assets/js/bootstrap-table.js') }}"></script>
|
||||
<script src="{{ asset('assets/js/extensions/mobile/bootstrap-table-mobile.js') }}"></script>
|
||||
<script type="text/javascript">
|
||||
$('#table').bootstrapTable({
|
||||
classes: 'table table-responsive table-no-bordered',
|
||||
undefinedText: '',
|
||||
iconsPrefix: 'fa',
|
||||
showRefresh: false,
|
||||
search: false,
|
||||
pagination: false,
|
||||
sidePagination: 'server',
|
||||
sortable: false,
|
||||
showMultiSort: false,
|
||||
cookie: false,
|
||||
mobileResponsive: true,
|
||||
});
|
||||
|
||||
</script>
|
||||
@stop
|
||||
|
|
Loading…
Reference in a new issue